[Gambas-user] DrawImage
Shane
buster6seven at gmail.com
Sun Jan 10 00:03:14 CET 2021
Sorry Gianluigi
I should have mentioned that I am using SDL
so no DrawingArea
thanks anyway
On 10/1/21 9:59 am, Gianluigi wrote:
> Would you like to do something like this?
>
> Private hImg1 As Image
> Private hImg2 As Image
>
> Public Sub Form_Open()
>
> DrawingArea1.Width = 256
> DrawingArea1.Height = 512
> hImg1 = Picture["icon:/256/access"].Image
> hImg2 = hImg1.Copy()
> DrawingArea1.Refresh
>
> End
>
> Public Sub DrawingArea1_Draw()
>
> With paint
> .Begin(DrawingArea1)
> .DrawImage(hImg1, DrawingArea1.X, DrawingArea1.Y)
> .DrawImage(hImg2, DrawingArea1.X, DrawingArea1.Y + 256)
> .End
> End With
>
> End
>
> Regards
> Gianluigi
>
> Il giorno sab 9 gen 2021 alle ore 23:40 Shane <buster6seven at gmail.com
> <mailto:buster6seven at gmail.com>> ha scritto:
>
> Hi jussi
>
> tried
>
> backimg = Image.DrawImage(img1, 100, 100)
>
> returns Error Image.DrawImage is not static
>
> img1.DrawImage(img1, 100, 100)
> backimg = img1
>
> Did the same as what I was doing
> also it deleting the rest of the backimg
>
> thanks
>
>
> On 10/1/21 9:16 am, Jussi Lahtinen wrote:
>> Try:
>> backimg = Image.DrawImage(img1, 100, 100)
>> Or:
>> img1.DrawImage(img1, 100, 100)
>> backimg = img1
>>
>>
>> Jussi
>>
>> On Sun, Jan 10, 2021 at 12:04 AM Shane <buster6seven at gmail.com
>> <mailto:buster6seven at gmail.com>> wrote:
>>
>> hey
>>
>> Am I correct in believing that this code would put a copy of
>> img1 at
>> x=100, y=100 of backimg
>>
>> backimg = img1.DrawImage(img1, 100, 100)
>>
>> it draws img1 but at 0,0
>>
>> any ideas?
>>
>> Cheers Shane
>>
>>
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>
>>
>> ----[http://gambaswiki.org/wiki/doc/netiquette ]----
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210110/38b9f83f/attachment.htm>
More information about the User
mailing list