[Gambas-user] Help to draw text on picture...
Bruce Steers
bsteers4 at gmail.com
Mon May 29 15:29:37 CEST 2023
On Mon, 29 May 2023 at 13:33, Fabien TONIUTTI <fabien.toniutti at free.fr>
wrote:
> Hi,
>
> For a new calendar application, i need to write on picture text and
> symbol ( rectagne, circle or other from my choice).
>
> I saw on documentation i could draw on picture directly without to use
> drawarea.
>
> Could you send me sample of code to do this?
>
> regards
>
> ;)
>
You can Paint directly to a picture using Paint.class
Dim hPicture As Picture = Picture.Load(sImagePath)
Paint.Begin(hPicture)
Paint.Font.Size = 16 ' set font attributes
Paint.Background = Color.Blue ' set the color to paint with
' use Paint.methods like Paint.DrawText() to write text directly to
hPicture object
Paint.DrawText("This Text", 0, 0, hPicture.Width, Paint.Font.Height,
Align.Left)
Paint.End
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230529/bda8c48a/attachment.htm>
More information about the User
mailing list