Exemplo n.º 1
0
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;
}
Exemplo n.º 2
0
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;
}
Exemplo n.º 3
0
bool SystemDraw::IntersectClipOp(const Rect& r)
{
	FlushText();
	RectPath(r);
	cairo_clip(cr);
	return true;
}
Exemplo n.º 4
0
void Painter::DrawRectOp(int x, int y, int cx, int cy, Color color)
{
	RectPath(x, y, cx, cy);
	if(color == InvertColor)
		Invert();
	Fill(color);
}
Exemplo n.º 5
0
bool Painter::ClipOp(const Rect& r)
{
	Begin();
	RectPath(r);
	Clip();
	return true;
}
Exemplo n.º 6
0
bool Painter::IntersectClipOp(const Rect& r)
{
	return true;
	RectPath(r);
	Clip();
	return true;
}
Exemplo n.º 7
0
bool SystemDraw::ClipOp(const Rect& r)
{
	Push();
	RectPath(r);
	Painter::Clip();
	return true;
}
Exemplo n.º 8
0
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));
}
Exemplo n.º 9
0
bool Painter::ClipoffOp(const Rect& r)
{
	Begin();
	RectPath(r);
	Clip();
	Translate(r.left, r.top);
	return true;
}
Exemplo n.º 10
0
bool SystemDraw::ClipOp(const Rect& r)
{
	FlushText();
	Push();
	clip.Top() &= r.Offseted(GetOffset());
	RectPath(r);
	cairo_clip(cr);
	return true;
}
Exemplo n.º 11
0
bool SystemDraw::ClipoffOp(const Rect& r)
{
	Push();
	offset.Top() += r.TopLeft();
	RectPath(r);
	Painter::Clip();
	Translate(r.left, r.top);
	return true;
}
Exemplo n.º 12
0
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;
}
Exemplo n.º 13
0
Painter& Painter::RectPath(const Rect& r)
{
	RectPath(r.left, r.top, r.GetWidth(), r.GetHeight());
	return *this;
}
Exemplo n.º 14
0
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));
}
Exemplo n.º 15
0
void Painter::DrawRectOp(int x, int y, int cx, int cy, Color color)
{
	RectPath(x, y, cx, cy);
	Fill(color);
}
Exemplo n.º 16
0
void Painter::RectPath(const Rect& r)
{
	RectPath(r.left, r.top, r.GetWidth(), r.GetHeight());
}