21e325b27a
* NEW: Put the old examples in '/trunk/app/examples'. git-svn-id: svn://localhost/gambas/trunk@6724 867c0c6c-44f3-4631-809d-bfa615b0a4ec
18 lines
437 B
Text
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
|