gambas-source-code/app/examples/Drawing/Painting/Example12
Benoît Minisini c6a9cd69c2 [EXAMPLES]
* NEW: Add examples again. I hope correctly this time.


git-svn-id: svn://localhost/gambas/trunk@6726 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-12-12 19:58:52 +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