[fpc-pascal] Looking for a suitable graphics library/component

Anthony Walter sysrpl at gmail.com
Tue Mar 22 19:11:15 CET 2011


Oh, you want a retained mode graphics system. That should be pretty easy to
write yourself.

Just write a class like TDrawable with a Paint(), HitTest(Point), and
Intersects(Rect) methods and derive from that to have your different drawn
types.

Keep a list of those items in your drawing surface.

Call HitTest(MousePoint) when the mouse moves over the drawing area and
track the hot/pressed/captured item.

When you surface needs to be painted, loop through the list and if
DrawableItem.Intersects(DirectRect) then DrawableItem.Paint().

I don't think you'll find a ready made system to accommodate all your
drawing needs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110322/99166c8a/attachment.html>


More information about the fpc-pascal mailing list