[CONFIGURATION]
* NEW: Do not compile gb.qt.kde anymore. [GB.DRAW] * NEW: Work continues on the new Paint interface. git-svn-id: svn://localhost/gambas/trunk@2521 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
a797cf2bfc
commit
67a672c6d7
@ -1,4 +1,4 @@
|
|||||||
SUBDIRS = main @bzlib2_dir@ @zlib_dir@ @mysql_dir@ @odbc_dir@ @postgresql_dir@ @sqlite3_dir@ @sqlite2_dir@ @firebird_dir@ @gtk_dir@ @net_dir@ @curl_dir@ @smtp_dir@ @pcre_dir@ @qt_dir@ @kde_dir@ @sdl_dir@ @sdlsound_dir@ @xml_dir@ @v4l_dir@ @crypt_dir@ @opengl_dir@ @corba_dir@ @pdf_dir@ @gtksvg_dir@ @desktop_dir@ @qt4_dir@ @cairo_dir@ @imageio_dir@ @imageimlib_dir@ comp app examples
|
SUBDIRS = main @bzlib2_dir@ @zlib_dir@ @mysql_dir@ @odbc_dir@ @postgresql_dir@ @sqlite3_dir@ @sqlite2_dir@ @firebird_dir@ @gtk_dir@ @net_dir@ @curl_dir@ @smtp_dir@ @pcre_dir@ @qt_dir@ @sdl_dir@ @sdlsound_dir@ @xml_dir@ @v4l_dir@ @crypt_dir@ @opengl_dir@ @corba_dir@ @pdf_dir@ @gtksvg_dir@ @desktop_dir@ @qt4_dir@ @cairo_dir@ @imageio_dir@ @imageimlib_dir@ comp app examples
|
||||||
|
|
||||||
EXTRA_DIST = component.am README README.*[^~] TODO TEMPLATE reconf reconf-all
|
EXTRA_DIST = component.am README README.*[^~] TODO TEMPLATE reconf reconf-all
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: FCommit.class:255 FConflict.class:348 FConnectionEditor.class:1822
|
#: FCommit.class:255 FConflict.class:348 FConnectionEditor.class:1822
|
||||||
#: FEditor.class:3196 FForm.class:3622 FIconEditor.class:2150
|
#: FEditor.class:3196 FForm.class:3622 FIconEditor.class:2150
|
||||||
#: FOption.class:1189 FOutput.class:455 FTextEditor.class:642
|
#: FOption.class:1190 FOutput.class:455 FTextEditor.class:642
|
||||||
msgid "Undo"
|
msgid "Undo"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -555,7 +555,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: FConflict.class:25 FFindList.class:203 FIconEditor.class:1412
|
#: FConflict.class:25 FFindList.class:203 FIconEditor.class:1412
|
||||||
#: FImportTable.class:656 FInfo.class:427 FMakeInstall.class:260
|
#: FImportTable.class:656 FInfo.class:427 FMakeInstall.class:260
|
||||||
#: FOption.class:1210 FTips.class:232
|
#: FOption.class:1211 FTips.class:232
|
||||||
msgid "Close"
|
msgid "Close"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -909,7 +909,7 @@ msgid "Style sheet"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FCreateFile.class:744 FCreateProject.class:537 FImportTable.class:489
|
#: FCreateFile.class:744 FCreateProject.class:537 FImportTable.class:489
|
||||||
#: FOption.class:1016 FPropertyProject.class:1653
|
#: FOption.class:1017 FPropertyProject.class:1653
|
||||||
msgid "Options"
|
msgid "Options"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -1113,7 +1113,7 @@ msgid "Function"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FDebugInfo.class:51 FFindList.class:73 FIconEditor.class:2278
|
#: FDebugInfo.class:51 FFindList.class:73 FIconEditor.class:2278
|
||||||
#: FOption.class:1034
|
#: FOption.class:1035
|
||||||
msgid "Line"
|
msgid "Line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -1318,7 +1318,7 @@ msgstr ""
|
|||||||
msgid "Paste as comments"
|
msgid "Paste as comments"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FEditor.class:3365 FOption.class:997
|
#: FEditor.class:3365 FOption.class:998
|
||||||
msgid "Editor"
|
msgid "Editor"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -3081,63 +3081,63 @@ msgstr ""
|
|||||||
msgid "Show documentation in popups"
|
msgid "Show documentation in popups"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:992
|
#: FOption.class:993
|
||||||
msgid "Clear documentation cache"
|
msgid "Clear documentation cache"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1002
|
#: FOption.class:1003
|
||||||
msgid "Font"
|
msgid "Font"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1026
|
#: FOption.class:1027
|
||||||
msgid "Procedure separation"
|
msgid "Procedure separation"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1034 FProperty.class:739
|
#: FOption.class:1035 FProperty.class:739
|
||||||
msgid "None"
|
msgid "None"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1034
|
#: FOption.class:1035
|
||||||
msgid "Blend"
|
msgid "Blend"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1045
|
#: FOption.class:1046
|
||||||
msgid "Highlight current line"
|
msgid "Highlight current line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1063
|
#: FOption.class:1064
|
||||||
msgid "Highlight modified lines"
|
msgid "Highlight modified lines"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1081
|
#: FOption.class:1082
|
||||||
msgid "Show line numbers"
|
msgid "Show line numbers"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1099
|
#: FOption.class:1100
|
||||||
msgid "Fold procedures by default"
|
msgid "Fold procedures by default"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1117
|
#: FOption.class:1118
|
||||||
msgid "Default tab size"
|
msgid "Default tab size"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1130
|
#: FOption.class:1131
|
||||||
msgid "spaces"
|
msgid "spaces"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1141
|
#: FOption.class:1142
|
||||||
msgid "Keywords in upper case"
|
msgid "Keywords in upper case"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1152
|
#: FOption.class:1153
|
||||||
msgid "Theme"
|
msgid "Theme"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1175
|
#: FOption.class:1176
|
||||||
msgid "Import theme"
|
msgid "Import theme"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: FOption.class:1182
|
#: FOption.class:1183
|
||||||
msgid "Export theme"
|
msgid "Export theme"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -264,6 +264,7 @@
|
|||||||
Indent = True
|
Indent = True
|
||||||
{ btnClearCache Button
|
{ btnClearCache Button
|
||||||
MoveScaled(0,0,39,4)
|
MoveScaled(0,0,39,4)
|
||||||
|
AutoResize = True
|
||||||
Text = ("Clear documentation cache")
|
Text = ("Clear documentation cache")
|
||||||
Picture = Picture["icon:/small/trash"]
|
Picture = Picture["icon:/small/trash"]
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,6 @@ GB_CONFIG_SUBDIRS(curl, gb.net.curl)
|
|||||||
GB_CONFIG_SUBDIRS(smtp, gb.net.smtp)
|
GB_CONFIG_SUBDIRS(smtp, gb.net.smtp)
|
||||||
GB_CONFIG_SUBDIRS(pcre, gb.pcre)
|
GB_CONFIG_SUBDIRS(pcre, gb.pcre)
|
||||||
GB_CONFIG_SUBDIRS(qt, gb.qt)
|
GB_CONFIG_SUBDIRS(qt, gb.qt)
|
||||||
GB_CONFIG_SUBDIRS(kde, gb.qt.kde)
|
|
||||||
GB_CONFIG_SUBDIRS(sdl, gb.sdl)
|
GB_CONFIG_SUBDIRS(sdl, gb.sdl)
|
||||||
GB_CONFIG_SUBDIRS(sdlsound, gb.sdl.sound)
|
GB_CONFIG_SUBDIRS(sdlsound, gb.sdl.sound)
|
||||||
GB_CONFIG_SUBDIRS(xml, gb.xml)
|
GB_CONFIG_SUBDIRS(xml, gb.xml)
|
||||||
|
@ -334,37 +334,27 @@ BEGIN_PROPERTY(_property) \
|
|||||||
GB.ReturnObject(extents); \
|
GB.ReturnObject(extents); \
|
||||||
END_METHOD
|
END_METHOD
|
||||||
|
|
||||||
#define IMPLEMENT_PROPERTY_INTEGER(_property, _api) \
|
#define IMPLEMENT_PROPERTY(_property, _api, _type, _gtype, _return) \
|
||||||
BEGIN_PROPERTY(_property) \
|
BEGIN_PROPERTY(_property) \
|
||||||
int value; \
|
_type value; \
|
||||||
CHECK_DEVICE(); \
|
CHECK_DEVICE(); \
|
||||||
if (READ_PROPERTY) \
|
if (READ_PROPERTY) \
|
||||||
{ \
|
{ \
|
||||||
PAINT->_api(THIS, FALSE, &value); \
|
PAINT->_api(THIS, FALSE, &value); \
|
||||||
GB.ReturnInteger(value); \
|
_return(value); \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
value = VPROP(GB_INTEGER); \
|
value = (_type)VPROP(_gtype); \
|
||||||
PAINT->_api(THIS, TRUE, &value); \
|
PAINT->_api(THIS, TRUE, &value); \
|
||||||
} \
|
} \
|
||||||
END_METHOD
|
END_METHOD
|
||||||
|
|
||||||
|
#define IMPLEMENT_PROPERTY_INTEGER(_property, _api) \
|
||||||
|
IMPLEMENT_PROPERTY(_property, _api, int, GB_INTEGER, GB.ReturnInteger)
|
||||||
|
|
||||||
#define IMPLEMENT_PROPERTY_FLOAT(_property, _api) \
|
#define IMPLEMENT_PROPERTY_FLOAT(_property, _api) \
|
||||||
BEGIN_PROPERTY(_property) \
|
IMPLEMENT_PROPERTY(_property, _api, float, GB_FLOAT, GB.ReturnFloat)
|
||||||
double value; \
|
|
||||||
CHECK_DEVICE(); \
|
|
||||||
if (READ_PROPERTY) \
|
|
||||||
{ \
|
|
||||||
PAINT->_api(THIS, FALSE, &value); \
|
|
||||||
GB.ReturnFloat(value); \
|
|
||||||
} \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
value = VPROP(GB_FLOAT); \
|
|
||||||
PAINT->_api(THIS, TRUE, &value); \
|
|
||||||
} \
|
|
||||||
END_METHOD
|
|
||||||
|
|
||||||
IMPLEMENT_METHOD(Paint_Save, Save)
|
IMPLEMENT_METHOD(Paint_Save, Save)
|
||||||
IMPLEMENT_METHOD(Paint_Restore, Restore)
|
IMPLEMENT_METHOD(Paint_Restore, Restore)
|
||||||
@ -384,6 +374,24 @@ IMPLEMENT_PROPERTY_FLOAT(Paint_DashOffset, DashOffset)
|
|||||||
IMPLEMENT_METHOD(Paint_NewPath, NewPath)
|
IMPLEMENT_METHOD(Paint_NewPath, NewPath)
|
||||||
IMPLEMENT_METHOD(Paint_ClosePath, ClosePath)
|
IMPLEMENT_METHOD(Paint_ClosePath, ClosePath)
|
||||||
|
|
||||||
|
BEGIN_PROPERTY(Paint_X)
|
||||||
|
|
||||||
|
float x, y;
|
||||||
|
CHECK_DEVICE();
|
||||||
|
PAINT->GetCurrentPoint(THIS, &x, &y);
|
||||||
|
GB.ReturnFloat((double)x);
|
||||||
|
|
||||||
|
END_PROPERTY
|
||||||
|
|
||||||
|
BEGIN_PROPERTY(Paint_Y)
|
||||||
|
|
||||||
|
float x, y;
|
||||||
|
CHECK_DEVICE();
|
||||||
|
PAINT->GetCurrentPoint(THIS, &x, &y);
|
||||||
|
GB.ReturnFloat((double)y);
|
||||||
|
|
||||||
|
END_PROPERTY
|
||||||
|
|
||||||
BEGIN_METHOD(Paint_Arc, GB_FLOAT xc; GB_FLOAT yc; GB_FLOAT radius; GB_FLOAT angle1; GB_FLOAT angle2)
|
BEGIN_METHOD(Paint_Arc, GB_FLOAT xc; GB_FLOAT yc; GB_FLOAT radius; GB_FLOAT angle1; GB_FLOAT angle2)
|
||||||
|
|
||||||
CHECK_DEVICE();
|
CHECK_DEVICE();
|
||||||
@ -419,6 +427,121 @@ BEGIN_METHOD(Paint_Rectangle, GB_FLOAT x; GB_FLOAT y; GB_FLOAT w; GB_FLOAT h)
|
|||||||
|
|
||||||
END_METHOD
|
END_METHOD
|
||||||
|
|
||||||
|
IMPLEMENT_PROPERTY(Paint_Font, Font, GB_FONT, GB_OBJECT, GB.ReturnObject)
|
||||||
|
|
||||||
|
BEGIN_METHOD(Paint_Text, GB_STRING text; GB_FLOAT x; GB_FLOAT y; GB_FLOAT w; GB_FLOAT h; GB_INTEGER align)
|
||||||
|
|
||||||
|
CHECK_DEVICE();
|
||||||
|
|
||||||
|
if (MISSING(x) || MISSING(y))
|
||||||
|
{
|
||||||
|
PAINT->Text(THIS, STRING(text), LENGTH(text));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (MISSING(w) || MISSING(h))
|
||||||
|
{
|
||||||
|
PAINT->MoveTo(THIS, (float)VARG(x), (float)VARG(y));
|
||||||
|
PAINT->Text(THIS, STRING(text), LENGTH(text));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(stderr, "Paint.Text: Not yet implemented\n");
|
||||||
|
|
||||||
|
END_METHOD
|
||||||
|
|
||||||
|
BEGIN_METHOD(Paint_TextExtents, GB_STRING text)
|
||||||
|
|
||||||
|
PAINT_EXTENTS *extents;
|
||||||
|
|
||||||
|
CHECK_DEVICE();
|
||||||
|
|
||||||
|
GB.New(POINTER(&extents), GB.FindClass("PaintExtents"), NULL, NULL);
|
||||||
|
PAINT->TextExtents(THIS, STRING(text), LENGTH(text), &extents->ext);
|
||||||
|
|
||||||
|
GB.ReturnObject(extents);
|
||||||
|
|
||||||
|
END_METHOD
|
||||||
|
|
||||||
|
static void make_brush(GB_BRUSH brush)
|
||||||
|
{
|
||||||
|
PAINT_BRUSH *that;
|
||||||
|
GB.New(POINTER(&that), GB.FindClass("PaintBrush"), NULL, NULL);
|
||||||
|
that->brush = brush;
|
||||||
|
GB.ReturnObject(that);
|
||||||
|
}
|
||||||
|
|
||||||
|
BEGIN_METHOD(Paint_Color, GB_INTEGER color)
|
||||||
|
|
||||||
|
GB_BRUSH brush;
|
||||||
|
|
||||||
|
CHECK_DEVICE();
|
||||||
|
|
||||||
|
PAINT->Brush.Color(&brush, VARG(color));
|
||||||
|
make_brush(brush);
|
||||||
|
|
||||||
|
END_METHOD
|
||||||
|
|
||||||
|
BEGIN_METHOD(Paint_Image, GB_OBJECT image; GB_FLOAT x; GB_FLOAT y; GB_INTEGER extend)
|
||||||
|
|
||||||
|
GB_BRUSH brush;
|
||||||
|
|
||||||
|
CHECK_DEVICE();
|
||||||
|
|
||||||
|
if (GB.CheckObject(VARG(image)))
|
||||||
|
return;
|
||||||
|
|
||||||
|
PAINT->Brush.Image(&brush, (GB_IMAGE)VARG(image), (float)VARGOPT(x, 0), (float)VARGOPT(y, 0), VARGOPT(extend, GB_PAINT_EXTEND_PAD));
|
||||||
|
make_brush(brush);
|
||||||
|
|
||||||
|
END_METHOD
|
||||||
|
|
||||||
|
static void handle_color_stop(GB_BRUSH brush, GB_ARRAY positions, GB_ARRAY colors)
|
||||||
|
{
|
||||||
|
int nstop;
|
||||||
|
|
||||||
|
nstop = Min(GB.Array.Count(positions), GB.Array.Count(colors));
|
||||||
|
if (nstop)
|
||||||
|
PAINT->Brush.SetColorStops(brush, nstop, (double *)GB.Array.Get(positions, 0), (GB_COLOR *)GB.Array.Get(colors, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
BEGIN_METHOD(Paint_LinearGradient, GB_FLOAT x0; GB_FLOAT y0; GB_FLOAT x1; GB_FLOAT y1; GB_OBJECT positions; GB_OBJECT colors)
|
||||||
|
|
||||||
|
GB_BRUSH brush;
|
||||||
|
GB_ARRAY positions, colors;
|
||||||
|
|
||||||
|
positions = (GB_ARRAY)VARG(positions);
|
||||||
|
if (GB.CheckObject(positions))
|
||||||
|
return;
|
||||||
|
colors = (GB_ARRAY)VARG(colors);
|
||||||
|
if (GB.CheckObject(colors))
|
||||||
|
return;
|
||||||
|
|
||||||
|
PAINT->Brush.LinearGradient(&brush, (float)VARG(x0), (float)VARG(y0), (float)VARG(x1), (float)VARG(y1));
|
||||||
|
handle_color_stop(brush, positions, colors);
|
||||||
|
make_brush(brush);
|
||||||
|
|
||||||
|
END_METHOD
|
||||||
|
|
||||||
|
BEGIN_METHOD(Paint_RadialGradient, GB_FLOAT cx0; GB_FLOAT cy0; GB_FLOAT radius0; GB_FLOAT cx1; GB_FLOAT cy1; GB_FLOAT radius1; GB_OBJECT positions; GB_OBJECT colors)
|
||||||
|
|
||||||
|
GB_BRUSH brush;
|
||||||
|
GB_ARRAY positions, colors;
|
||||||
|
|
||||||
|
positions = (GB_ARRAY)VARG(positions);
|
||||||
|
if (GB.CheckObject(positions))
|
||||||
|
return;
|
||||||
|
colors = (GB_ARRAY)VARG(colors);
|
||||||
|
if (GB.CheckObject(colors))
|
||||||
|
return;
|
||||||
|
|
||||||
|
PAINT->Brush.RadialGradient(&brush, (float)VARG(cx0), (float)VARG(cy0), (float)VARG(radius0), (float)VARG(cx1), (float)VARG(cy1), (float)VARG(radius1));
|
||||||
|
handle_color_stop(brush, positions, colors);
|
||||||
|
make_brush(brush);
|
||||||
|
|
||||||
|
END_METHOD
|
||||||
|
|
||||||
|
|
||||||
GB_DESC CPaintDesc[] =
|
GB_DESC CPaintDesc[] =
|
||||||
{
|
{
|
||||||
GB_DECLARE("Paint", 0), GB_VIRTUAL_CLASS(),
|
GB_DECLARE("Paint", 0), GB_VIRTUAL_CLASS(),
|
||||||
@ -502,6 +625,8 @@ GB_DESC CPaintDesc[] =
|
|||||||
//GB_STATIC_METHOD("NewSubPath", NULL, CAIRO_new_sub_path, NULL),
|
//GB_STATIC_METHOD("NewSubPath", NULL, CAIRO_new_sub_path, NULL),
|
||||||
GB_STATIC_METHOD("ClosePath", NULL, Paint_ClosePath, NULL),
|
GB_STATIC_METHOD("ClosePath", NULL, Paint_ClosePath, NULL),
|
||||||
|
|
||||||
|
GB_STATIC_PROPERTY_READ("X", "f", Paint_X),
|
||||||
|
GB_STATIC_PROPERTY_READ("Y", "f", Paint_Y),
|
||||||
GB_STATIC_METHOD("Arc", NULL, Paint_Arc, "(XC)f(YC)f(Radius)f[(Angle1)f(Angle2)f]"),
|
GB_STATIC_METHOD("Arc", NULL, Paint_Arc, "(XC)f(YC)f(Radius)f[(Angle1)f(Angle2)f]"),
|
||||||
//GB_STATIC_METHOD("ArcNegative", NULL, CAIRO_arc_negative, "(XC)f(YC)f(Radius)f[(Angle1)f(Angle2)f]"),
|
//GB_STATIC_METHOD("ArcNegative", NULL, CAIRO_arc_negative, "(XC)f(YC)f(Radius)f[(Angle1)f(Angle2)f]"),
|
||||||
GB_STATIC_METHOD("CurveTo", NULL, Paint_CurveTo, "(X1)f(Y1)f(X2)f(Y2)f(X3)f(Y3)f"),
|
GB_STATIC_METHOD("CurveTo", NULL, Paint_CurveTo, "(X1)f(Y1)f(X2)f(Y2)f(X3)f(Y3)f"),
|
||||||
@ -509,18 +634,16 @@ GB_DESC CPaintDesc[] =
|
|||||||
GB_STATIC_METHOD("MoveTo", NULL, Paint_MoveTo, "(X)f(Y)f"),
|
GB_STATIC_METHOD("MoveTo", NULL, Paint_MoveTo, "(X)f(Y)f"),
|
||||||
GB_STATIC_METHOD("Rectangle", NULL, Paint_Rectangle, "(X)f(Y)f(Width)f(Height)f"),
|
GB_STATIC_METHOD("Rectangle", NULL, Paint_Rectangle, "(X)f(Y)f(Width)f(Height)f"),
|
||||||
|
|
||||||
#if 0
|
|
||||||
GB_STATIC_PROPERTY("Font", "Font", Paint_Font),
|
GB_STATIC_PROPERTY("Font", "Font", Paint_Font),
|
||||||
GB_STATIC_METHOD("Text", NULL, Paint_Text, "(Text)s[(X)f(Y)f(Width)f(Height)f(Alignment)i)]"),
|
GB_STATIC_METHOD("Text", NULL, Paint_Text, "(Text)s[(X)f(Y)f(Width)f(Height)f(Alignment)i)]"),
|
||||||
GB_STATIC_METHOD("TextExtents", "TextExtents", Paint_TextExtents, "(Text)s"),
|
GB_STATIC_METHOD("TextExtents", "TextExtents", Paint_TextExtents, "(Text)s"),
|
||||||
|
|
||||||
GB_STATIC_METHOD("ColorBrush", "PaintBrush", Paint_ColorBrush, "(Color)i"),
|
GB_STATIC_METHOD("Color", "PaintBrush", Paint_Color, "(Color)i"),
|
||||||
GB_STATIC_METHOD("ImageBrush", "PaintBrush", Paint_ImageBrush, "(Image)Image;[(X)f(Y)f(Extend)i]"),
|
GB_STATIC_METHOD("Image", "PaintBrush", Paint_Image, "(Image)Image;[(X)f(Y)f(Extend)i]"),
|
||||||
GB_STATIC_METHOD("LinearGradient", "PaintBrush", Paint_LinearGradient, "(X0)f(Y0)f(X1)f(Y1)f(Colors)Float[][];"),
|
GB_STATIC_METHOD("LinearGradient", "PaintBrush", Paint_LinearGradient, "(X0)f(Y0)f(X1)f(Y1)f(Positions)Float[];(Colors)Integer[];"),
|
||||||
GB_STATIC_METHOD("RadialGradient", "PaintBrush", Paint_RadialGradient, "(CX0)f(CY0)f(Radius0)f(CX1)f(CY1)f(Radius1)f(Colors)Float[][];"),
|
GB_STATIC_METHOD("RadialGradient", "PaintBrush", Paint_RadialGradient, "(CX0)f(CY0)f(Radius0)f(CX1)f(CY1)f(Radius1)f(Positions)Float[];(Colors)Integer[];"),
|
||||||
|
|
||||||
GB_STATIC_PROPERTY_SELF("Matrix", ".PaintMatrix"),
|
GB_STATIC_PROPERTY_SELF("Matrix", ".PaintMatrix"),
|
||||||
#endif
|
|
||||||
|
|
||||||
GB_END_DECLARE
|
GB_END_DECLARE
|
||||||
};
|
};
|
||||||
|
@ -71,7 +71,7 @@ struct GB_PAINT_DESC;
|
|||||||
|
|
||||||
typedef
|
typedef
|
||||||
struct {
|
struct {
|
||||||
double x1, y1, x2, y2;
|
float x1, y1, x2, y2;
|
||||||
}
|
}
|
||||||
GB_EXTENTS;
|
GB_EXTENTS;
|
||||||
|
|
||||||
@ -138,34 +138,35 @@ typedef
|
|||||||
void (*Stroke)(GB_PAINT *d, bool preserve);
|
void (*Stroke)(GB_PAINT *d, bool preserve);
|
||||||
|
|
||||||
void (*PathExtents)(GB_PAINT *d, GB_EXTENTS *ext);
|
void (*PathExtents)(GB_PAINT *d, GB_EXTENTS *ext);
|
||||||
bool (*PathContains)(GB_PAINT *d, double x, double y);
|
bool (*PathContains)(GB_PAINT *d, float x, float y);
|
||||||
|
|
||||||
void (*Dash)(GB_PAINT *d, bool set, double **dash, int *count);
|
void (*Dash)(GB_PAINT *d, bool set, float **dash, int *count);
|
||||||
void (*DashOffset)(GB_PAINT *d, bool set, double *offset);
|
void (*DashOffset)(GB_PAINT *d, bool set, float *offset);
|
||||||
|
|
||||||
void (*FillRule)(GB_PAINT *d, bool set, int *value);
|
void (*FillRule)(GB_PAINT *d, bool set, int *value);
|
||||||
void (*LineCap)(GB_PAINT *d, bool set, int *value);
|
void (*LineCap)(GB_PAINT *d, bool set, int *value);
|
||||||
void (*LineJoin)(GB_PAINT *d, bool set, int *value);
|
void (*LineJoin)(GB_PAINT *d, bool set, int *value);
|
||||||
void (*LineWidth)(GB_PAINT *d, bool set, double *value);
|
void (*LineWidth)(GB_PAINT *d, bool set, float *value);
|
||||||
void (*MiterLimit)(GB_PAINT *d, bool set, double *value);
|
void (*MiterLimit)(GB_PAINT *d, bool set, float *value);
|
||||||
|
|
||||||
void (*Operator)(GB_PAINT *d, bool set, int *value);
|
void (*Operator)(GB_PAINT *d, bool set, int *value);
|
||||||
|
|
||||||
void (*NewPath)(GB_PAINT *d);
|
void (*NewPath)(GB_PAINT *d);
|
||||||
void (*ClosePath)(GB_PAINT *d);
|
void (*ClosePath)(GB_PAINT *d);
|
||||||
|
|
||||||
void (*Arc)(GB_PAINT *d, double xc, double yc, double radius, double a1, double a2);
|
void (*Arc)(GB_PAINT *d, float xc, float yc, float radius, float a1, float a2);
|
||||||
void (*Rectangle)(GB_PAINT *d, double x, double y, double width, double height);
|
void (*Rectangle)(GB_PAINT *d, float x, float y, float width, float height);
|
||||||
void (*MoveTo)(GB_PAINT *d, double x, double y);
|
void (*GetCurrentPoint)(GB_PAINT *d, float *x, float *y);
|
||||||
void (*LineTo)(GB_PAINT *d, double x, double y);
|
void (*MoveTo)(GB_PAINT *d, float x, float y);
|
||||||
void (*CurveTo)(GB_PAINT *d, double x1, double y1, double x2, double y2, double x3, double y3);
|
void (*LineTo)(GB_PAINT *d, float x, float y);
|
||||||
|
void (*CurveTo)(GB_PAINT *d, float x1, float y1, float x2, float y2, float x3, float y3);
|
||||||
|
|
||||||
void (*Text)(GB_PAINT *d, const char *text);
|
void (*Text)(GB_PAINT *d, const char *text, int len);
|
||||||
void (*TextExtents)(GB_PAINT *d, const char *text, GB_EXTENTS *ext);
|
void (*TextExtents)(GB_PAINT *d, const char *text, int len, GB_EXTENTS *ext);
|
||||||
|
|
||||||
void (*Translate)(GB_PAINT *d, double tx, double ty);
|
void (*Translate)(GB_PAINT *d, float tx, float ty);
|
||||||
void (*Scale)(GB_PAINT *d, double sx, double sy);
|
void (*Scale)(GB_PAINT *d, float sx, float sy);
|
||||||
void (*Rotate)(GB_PAINT *d, double angle);
|
void (*Rotate)(GB_PAINT *d, float angle);
|
||||||
void (*Matrix)(GB_PAINT *d, bool set, GB_TRANSFORM *matrix);
|
void (*Matrix)(GB_PAINT *d, bool set, GB_TRANSFORM *matrix);
|
||||||
|
|
||||||
void (*SetBrush)(GB_PAINT *d, GB_BRUSH brush);
|
void (*SetBrush)(GB_PAINT *d, GB_BRUSH brush);
|
||||||
@ -173,19 +174,19 @@ typedef
|
|||||||
struct {
|
struct {
|
||||||
void (*Free)(GB_BRUSH brush);
|
void (*Free)(GB_BRUSH brush);
|
||||||
void (*Color)(GB_BRUSH *brush, GB_COLOR color);
|
void (*Color)(GB_BRUSH *brush, GB_COLOR color);
|
||||||
void (*Image)(GB_BRUSH *brush, GB_IMAGE image, double x, double y, int extend);
|
void (*Image)(GB_BRUSH *brush, GB_IMAGE image, float x, float y, int extend);
|
||||||
void (*LinearGradient)(GB_BRUSH *brush, double x0, double y0, double x1, double y1);
|
void (*LinearGradient)(GB_BRUSH *brush, float x0, float y0, float x1, float y1);
|
||||||
void (*RadialGradient)(GB_BRUSH *brush, double cx0, double cy0, double r0, double cx1, double cy1, double r1);
|
void (*RadialGradient)(GB_BRUSH *brush, float cx0, float cy0, float r0, float cx1, float cy1, float r1);
|
||||||
void (*SetColorStop)(GB_BRUSH brush, int nstop, double *pos, GB_COLOR *color);
|
void (*SetColorStops)(GB_BRUSH brush, int nstop, double *pos, GB_COLOR *color);
|
||||||
void (*Matrix)(GB_BRUSH brush, bool set, GB_TRANSFORM *matrix);
|
void (*Matrix)(GB_BRUSH brush, bool set, GB_TRANSFORM *matrix);
|
||||||
}
|
}
|
||||||
Brush;
|
Brush;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
void (*Init)(GB_TRANSFORM matrix, double xx, double yx, double xy, double yy, double x0, double y0);
|
void (*Init)(GB_TRANSFORM matrix, float xx, float yx, float xy, float yy, float x0, float y0);
|
||||||
void (*Translate)(GB_TRANSFORM matrix, double tx, double ty);
|
void (*Translate)(GB_TRANSFORM matrix, float tx, float ty);
|
||||||
void (*Scale)(GB_TRANSFORM matrix, double sx, double sy);
|
void (*Scale)(GB_TRANSFORM matrix, float sx, float sy);
|
||||||
void (*Rotate)(GB_TRANSFORM matrix, double angle);
|
void (*Rotate)(GB_TRANSFORM matrix, float angle);
|
||||||
bool (*Invert)(GB_TRANSFORM matrix);
|
bool (*Invert)(GB_TRANSFORM matrix);
|
||||||
void (*Multiply)(GB_TRANSFORM matrix, GB_TRANSFORM matrix2);
|
void (*Multiply)(GB_TRANSFORM matrix, GB_TRANSFORM matrix2);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user