bool Painter::ExcludeClipOp(const Rect& r) { RectPath(Rect(-99999, -99999, 99999, r.top)); RectPath(Rect(-99999, r.top, r.left, 99999)); RectPath(Rect(r.right, r.top, 99999, 99999)); RectPath(Rect(r.left, r.bottom, r.right, 99999)); Clip(); return true; }
bool SystemDraw::ExcludeClipOp(const Rect& r) { FlushText(); RectPath(Rect(-99999, -99999, 99999, r.top)); RectPath(Rect(-99999, r.top, r.left, 99999)); RectPath(Rect(r.right, r.top, 99999, 99999)); RectPath(Rect(r.left, r.bottom, r.right, 99999)); cairo_clip(cr); return true; }
bool SystemDraw::IntersectClipOp(const Rect& r) { FlushText(); RectPath(r); cairo_clip(cr); return true; }
void Painter::DrawRectOp(int x, int y, int cx, int cy, Color color) { RectPath(x, y, cx, cy); if(color == InvertColor) Invert(); Fill(color); }
bool Painter::ClipOp(const Rect& r) { Begin(); RectPath(r); Clip(); return true; }
bool Painter::IntersectClipOp(const Rect& r) { return true; RectPath(r); Clip(); return true; }
bool SystemDraw::ClipOp(const Rect& r) { Push(); RectPath(r); Painter::Clip(); return true; }
void Painter::DrawImageOp(int x, int y, int cx, int cy, const Image& image, const Rect& src, Color color) { Image img = IsNull(color) ? image : SetColorKeepAlpha(image, color); RectPath(x, y, cx, cy); double sw = (double)cx / src.GetWidth(); double sh = (double)cy / src.GetHeight(); Fill(img, Xform2D::Scale(sw, sh) * Xform2D::Translation(x - sw * src.left, y - sh * src.top)); }
bool Painter::ClipoffOp(const Rect& r) { Begin(); RectPath(r); Clip(); Translate(r.left, r.top); return true; }
bool SystemDraw::ClipOp(const Rect& r) { FlushText(); Push(); clip.Top() &= r.Offseted(GetOffset()); RectPath(r); cairo_clip(cr); return true; }
bool SystemDraw::ClipoffOp(const Rect& r) { Push(); offset.Top() += r.TopLeft(); RectPath(r); Painter::Clip(); Translate(r.left, r.top); return true; }
bool SystemDraw::ClipoffOp(const Rect& r) { FlushText(); Push(); clip.Top() &= r.Offseted(GetOffset()); offset.Top() += r.TopLeft(); RectPath(r); cairo_clip(cr); cairo_translate(cr, r.left, r.top); return true; }
Painter& Painter::RectPath(const Rect& r) { RectPath(r.left, r.top, r.GetWidth(), r.GetHeight()); return *this; }
void Painter::DrawImageOp(int x, int y, int cx, int cy, const Image& img, const Rect& src, Color color) { // Color and src support!!! RectPath(x, y, cx, cy); Fill(img, Translate2D(x, y)); }
void Painter::DrawRectOp(int x, int y, int cx, int cy, Color color) { RectPath(x, y, cx, cy); Fill(color); }
void Painter::RectPath(const Rect& r) { RectPath(r.left, r.top, r.GetWidth(), r.GetHeight()); }