[GB.DRAW]
* BUG: Fix the Brush.Matrix property management. git-svn-id: svn://localhost/gambas/trunk@2560 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
767de86c25
commit
d01028cc99
3 changed files with 5 additions and 5 deletions
|
@ -297,7 +297,7 @@ Public Sub Example12()
|
|||
Paint.Scale(1 / Sqr(2), 1 / Sqr(2))
|
||||
Paint.Translate(-128, -128)
|
||||
hBrush = Paint.Image(himg, 0, 0)
|
||||
hBrush.Matrix = hBrush.Matrix.Scale(himg.w / 256.0 * 5.0, hImg.w / 256.0 * 5.0)
|
||||
hBrush.Matrix = hBrush.Matrix.Scale(1 / (himg.w / 256.0 * 5.0), 1 / (hImg.w / 256.0 * 5.0))
|
||||
Paint.Brush = hBrush
|
||||
Paint.Rectangle(0, 0, 256, 256)
|
||||
Paint.Fill
|
||||
|
|
|
@ -651,7 +651,7 @@ static void BrushImage(GB_BRUSH *brush, GB_IMAGE image)
|
|||
QImage *img = CIMAGE_get((CIMAGE *)image);
|
||||
|
||||
QBrush *br = new QBrush(*img);
|
||||
*brush = br;
|
||||
*brush = (GB_BRUSH)br;
|
||||
}
|
||||
|
||||
static void BrushLinearGradient(GB_BRUSH *brush, float x0, float y0, float x1, float y1, int nstop, double *positions, GB_COLOR *colors, int extend)
|
||||
|
|
|
@ -266,16 +266,16 @@ BEGIN_PROPERTY(PaintBrush_Matrix)
|
|||
if (READ_PROPERTY)
|
||||
{
|
||||
BPAINT->Transform.Create(&transform);
|
||||
BPAINT->Brush.Matrix(BTHIS, FALSE, transform);
|
||||
BPAINT->Brush.Matrix(BTHIS->brush, FALSE, transform);
|
||||
GB.ReturnObject(create_matrix(BPAINT, transform));
|
||||
}
|
||||
else
|
||||
{
|
||||
matrix = (PAINT_MATRIX *)VPROP(GB_OBJECT);
|
||||
if (!matrix)
|
||||
BPAINT->Brush.Matrix(BTHIS, TRUE, NULL);
|
||||
BPAINT->Brush.Matrix(BTHIS->brush, TRUE, NULL);
|
||||
else
|
||||
BPAINT->Brush.Matrix(BTHIS, TRUE, matrix->transform);
|
||||
BPAINT->Brush.Matrix(BTHIS->brush, TRUE, matrix->transform);
|
||||
}
|
||||
|
||||
END_PROPERTY
|
||||
|
|
Loading…
Reference in a new issue