[Gambas-user] drawing rectangles on a picture.
Gianluigi
bagonergi at gmail.com
Sun Oct 18 14:22:48 CEST 2020
Il giorno dom 18 ott 2020 alle ore 13:57 KKing <kicking177 at gmail.com> ha
scritto:
> So I want to load a png, then draw some rectangles on it and resave it.
>
> Any pointers, after reading and searching I'm just confused by Draw,
> Paint, DrawingArea, PictureBox etc.
>
> Also why does
> PictureBox1.Picture = Picture.Load("/media/user01/Test01.png")
> work but
> myPicture = New Picture
> myPicture.Load("/media/user01/Test01.png")
> PictureBox1.Picture = myPicture
> does not ?
>
Public Sub Form_Open()
Dim hImg1 As Image
Dim hImage As ImageView
hImage = New ImageView(Me)
hImage.W = 272
hImage.H = 272
hImg1 = Picture["icon:/256/linux"].Image
With paint
.Begin(hImg1)
.DrawRect(20, 20, 50, 50, Color.Blue, 2)
.End
End With
hImage.Image = hImg1
End
Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201018/a72011b1/attachment.htm>
More information about the User
mailing list