And handled the functions in draw.h. Now to test this final build, then get rid of the shared library stuff from CMakeLists.txt...
This commit is contained in:
parent
add92694bf
commit
241d8b59f0
12
unix/draw.c
12
unix/draw.c
|
@ -59,7 +59,7 @@ void uiDrawStroke(uiDrawContext *c, uiDrawPath *path, uiDrawBrush *b, uiDrawStro
|
|||
{
|
||||
cairo_pattern_t *pat;
|
||||
|
||||
runPath(path, c->cr);
|
||||
uiprivRunPath(path, c->cr);
|
||||
pat = mkbrush(b);
|
||||
cairo_set_source(c->cr, pat);
|
||||
switch (p->Cap) {
|
||||
|
@ -95,10 +95,10 @@ void uiDrawFill(uiDrawContext *c, uiDrawPath *path, uiDrawBrush *b)
|
|||
{
|
||||
cairo_pattern_t *pat;
|
||||
|
||||
runPath(path, c->cr);
|
||||
uiprivRunPath(path, c->cr);
|
||||
pat = mkbrush(b);
|
||||
cairo_set_source(c->cr, pat);
|
||||
switch (pathFillMode(path)) {
|
||||
switch (uiprivPathFillMode(path)) {
|
||||
case uiDrawFillModeWinding:
|
||||
cairo_set_fill_rule(c->cr, CAIRO_FILL_RULE_WINDING);
|
||||
break;
|
||||
|
@ -114,14 +114,14 @@ void uiDrawTransform(uiDrawContext *c, uiDrawMatrix *m)
|
|||
{
|
||||
cairo_matrix_t cm;
|
||||
|
||||
m2c(m, &cm);
|
||||
uiprivM2C(m, &cm);
|
||||
cairo_transform(c->cr, &cm);
|
||||
}
|
||||
|
||||
void uiDrawClip(uiDrawContext *c, uiDrawPath *path)
|
||||
{
|
||||
runPath(path, c->cr);
|
||||
switch (pathFillMode(path)) {
|
||||
uiprivRunPath(path, c->cr);
|
||||
switch (uiprivPathFillMode(path)) {
|
||||
case uiDrawFillModeWinding:
|
||||
cairo_set_fill_rule(c->cr, CAIRO_FILL_RULE_WINDING);
|
||||
break;
|
||||
|
|
|
@ -7,8 +7,8 @@ struct uiDrawContext {
|
|||
};
|
||||
|
||||
// drawpath.c
|
||||
extern void runPath(uiDrawPath *p, cairo_t *cr);
|
||||
extern uiDrawFillMode pathFillMode(uiDrawPath *path);
|
||||
extern void uiprivRunPath(uiDrawPath *p, cairo_t *cr);
|
||||
extern uiDrawFillMode uiprivPathFillMode(uiDrawPath *path);
|
||||
|
||||
// drawmatrix.c
|
||||
extern void m2c(uiDrawMatrix *m, cairo_matrix_t *c);
|
||||
extern void uiprivM2C(uiDrawMatrix *m, cairo_matrix_t *c);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "uipriv_unix.h"
|
||||
#include "draw.h"
|
||||
|
||||
void m2c(uiDrawMatrix *m, cairo_matrix_t *c)
|
||||
static void m2c(uiDrawMatrix *m, cairo_matrix_t *c)
|
||||
{
|
||||
c->xx = m->M11;
|
||||
c->yx = m->M12;
|
||||
|
@ -12,6 +12,12 @@ void m2c(uiDrawMatrix *m, cairo_matrix_t *c)
|
|||
c->y0 = m->M32;
|
||||
}
|
||||
|
||||
// needed by uiDrawTransform()
|
||||
void uiprivM2C(uiDrawMatrix *m, cairo_matrix_t *c)
|
||||
{
|
||||
m2c(m, c);
|
||||
}
|
||||
|
||||
static void c2m(cairo_matrix_t *c, uiDrawMatrix *m)
|
||||
{
|
||||
m->M11 = c->xx;
|
||||
|
|
|
@ -138,7 +138,7 @@ void uiDrawPathEnd(uiDrawPath *p)
|
|||
p->ended = TRUE;
|
||||
}
|
||||
|
||||
void runPath(uiDrawPath *p, cairo_t *cr)
|
||||
void uiprivRunPath(uiDrawPath *p, cairo_t *cr)
|
||||
{
|
||||
guint i;
|
||||
struct piece *piece;
|
||||
|
@ -193,7 +193,7 @@ void runPath(uiDrawPath *p, cairo_t *cr)
|
|||
}
|
||||
}
|
||||
|
||||
uiDrawFillMode pathFillMode(uiDrawPath *path)
|
||||
uiDrawFillMode uiprivPathFillMode(uiDrawPath *path)
|
||||
{
|
||||
return path->fillMode;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue