gambas-source-code/app/examples/Drawing/Painting/Example12
Benoît Minisini 21e325b27a [EXAMPLES]
* NEW: Put the old examples in '/trunk/app/examples'.


git-svn-id: svn://localhost/gambas/trunk@6724 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-12-11 23:49:07 +00:00

18 lines
437 B
Text

Public Sub Example12()
Dim hImg As Image
Dim hBrush As PaintBrush
hImg = Image.Load(IMAGE_NAME)
Paint.Translate(128, 128)
'Paint.Rotate(Pi / 4)
Paint.Scale(1 / Sqr(2), 1 / Sqr(2))
Paint.Translate(-128, -128)
hBrush = Paint.Image(himg, 0, 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
End