On Thu, 17 Jan 2013, Ulrich Hartmann wrote:
> 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

I once wrote a program for a game project at our school to design 8*8 sqpx
sprites with a palette of 4 different colours (this system is oriented at
Nintendo's GameBoy internal workings).

The whole thing is implemented using a CTile class which works on an Image
object internally. I attached a screenshot of it. Frankly, it is not really
good for fonts, as you can see :-) Is that of the kind you want to write?

Regards,
Tobi

<<attachment: gtd.png>>

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to