Implemented a basic translation.
This commit is contained in:
parent
87680a6470
commit
3d8f8f0756
|
@ -406,7 +406,12 @@ static void drawD2DLinearBrush(uiAreaDrawParams *p)
|
|||
uiDrawBrushGradientStop stops[2];
|
||||
uiDrawStrokeParams sp;
|
||||
|
||||
// TODO transform by (25,25) to leave some room
|
||||
uiDrawMatrix m;
|
||||
|
||||
// leave some room
|
||||
uiDrawMatrixSetIdentity(&m);
|
||||
uiDrawMatrixTranslate(&m, 25, 25);
|
||||
uiDrawTransform(p->Context, &m);
|
||||
|
||||
gradient.Type = uiDrawBrushTypeLinearGradient;
|
||||
gradient.X0 = 0;
|
||||
|
|
|
@ -178,6 +178,7 @@ static gboolean areaWidget_draw(GtkWidget *w, cairo_t *cr)
|
|||
dp.HScrollPos = gtk_adjustment_get_value(ap->ha);
|
||||
dp.VScrollPos = gtk_adjustment_get_value(ap->va);
|
||||
|
||||
// no need to save or restore the graphics state; GTK+ does that for us
|
||||
(*(ap->ah->Draw))(ap->ah, ap->a, &dp);
|
||||
|
||||
freeContext(dp.Context);
|
||||
|
|
Loading…
Reference in New Issue