mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-09 11:34:54 -06:00
Draw: Developing SDraw
git-svn-id: svn://ultimatepp.org/upp/trunk@6118 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
a5e716a613
commit
e47ef44972
9 changed files with 67 additions and 11 deletions
|
|
@ -411,19 +411,27 @@ bool Draw::IsPainting(int x, int y, int cx, int cy) const
|
|||
return IsPainting(RectC(x, y, cx, cy));
|
||||
}
|
||||
|
||||
static void (*sIgfn)(ImageBuffer& ib, const Painting& pw, Size sz, Point pos, int mode);
|
||||
static void (*sIwfn)(ImageBuffer& ib, const Drawing& p, int mode);
|
||||
static void (*sIgfn)(ImageBuffer& ib, const Painting& pw, Size sz, Point pos, int mode);
|
||||
static void (*sIwfn)(ImageBuffer& ib, const Drawing& p, int mode);
|
||||
static Image (*sRG)(Point at, int angle, int chr, Font fnt, Color color, Size sz);
|
||||
|
||||
void RegisterPaintingFns__(void (*ig)(ImageBuffer& ib, const Painting& pw, Size sz, Point pos, int mode),
|
||||
void (*iw)(ImageBuffer& ib, const Drawing& p, int mode))
|
||||
void (*iw)(ImageBuffer& ib, const Drawing& p, int mode),
|
||||
Image (*rg)(Point at, int angle, int chr, Font fnt, Color color, Size sz))
|
||||
{
|
||||
sIgfn = ig;
|
||||
sIwfn = iw;
|
||||
sRG = rg;
|
||||
}
|
||||
|
||||
bool HasPainter()
|
||||
{
|
||||
return sIgfn && sIwfn;
|
||||
return sIgfn && sIwfn && sRG;
|
||||
}
|
||||
|
||||
Image RenderGlyphByPainter(Point at, int angle, int chr, Font fnt, Color color, Size sz)
|
||||
{
|
||||
return sRG ? (*sRG)(at, angle, chr, fnt, color, sz) : Image();
|
||||
}
|
||||
|
||||
void PaintImageBuffer(ImageBuffer& ib, const Painting& p, Size sz, Point pos, int mode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue