[Gambas-user] Help with DrawingArea and class design

Benoît Minisini gambas at ...1...
Sun Jan 20 03:50:19 CET 2013


Le 17/01/2013 10:18, Ulrich Hartmann a écrit :
> Hi all,
>
> I'm trying to create a class which can draw a pixel-font character on screen and would let me edit the pixels (this is for my graphic lcd connected to an arduino project). So I started playing around with the Paint class in Gambas3.
>
> So here are my questions:
>
> If I wanted to create my own class in which I would need to draw stuff like boxes which represent the characters pixels and make them clickable to activate or deactivate pixels (eg. draw characters), which class would I use to inherit from (DrawAerea?)?
>
> Also how would I be able to draw form within my new class when it seems to be only possible to draw in the _Draw event of the DrawingArea (can I hijack the _Draw event insde the new class inherited from DrawigArea to do the drawing)?
>
> I guess what I want is more like my own component to display and edit a pixel character.
>
> Tips and help would be highly appreciated!
>
> Uli
>

Whatever you do, look at the Paint.ZoomImage() method.

-- 
Benoît Minisini




More information about the User mailing list