mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[kandinsky/context] Inline in header file
This commit is contained in:
committed by
Léa Saviot
parent
63424fb98b
commit
7b8f7007c4
@@ -2,7 +2,6 @@ SFLAGS += -Ikandinsky/include
|
||||
|
||||
kandinsky_src += $(addprefix kandinsky/src/,\
|
||||
color.cpp \
|
||||
context.cpp \
|
||||
context_line.cpp \
|
||||
context_pixel.cpp \
|
||||
context_rect.cpp \
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
class KDContext {
|
||||
public:
|
||||
void setOrigin(KDPoint origin);
|
||||
void setClippingRect(KDRect clippingRect);
|
||||
void setOrigin(KDPoint origin) { m_origin = origin; }
|
||||
void setClippingRect(KDRect clippingRect) { m_clippingRect = clippingRect; }
|
||||
|
||||
// Pixel manipulation
|
||||
void setPixel(KDPoint p, KDColor c);
|
||||
@@ -29,7 +29,10 @@ public:
|
||||
void blendRectWithMask(KDRect rect, KDColor color, const uint8_t * mask, KDColor * workingBuffer);
|
||||
void strokeRect(KDRect rect, KDColor color);
|
||||
protected:
|
||||
KDContext(KDPoint origin, KDRect clippingRect);
|
||||
KDContext(KDPoint origin, KDRect clippingRect) :
|
||||
m_origin(origin),
|
||||
m_clippingRect(clippingRect)
|
||||
{}
|
||||
virtual void pushRect(KDRect, const KDColor * pixels) = 0;
|
||||
virtual void pushRectUniform(KDRect rect, KDColor color) = 0;
|
||||
virtual void pullRect(KDRect rect, KDColor * pixels) = 0;
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#include <kandinsky/context.h>
|
||||
#include <assert.h>
|
||||
|
||||
KDContext::KDContext(KDPoint origin, KDRect clippingRect) :
|
||||
m_origin(origin),
|
||||
m_clippingRect(clippingRect)
|
||||
{
|
||||
}
|
||||
|
||||
void KDContext::setOrigin(KDPoint origin) {
|
||||
m_origin = origin;
|
||||
}
|
||||
|
||||
void KDContext::setClippingRect(KDRect clippingRect) {
|
||||
m_clippingRect = clippingRect;
|
||||
}
|
||||
Reference in New Issue
Block a user