|
-
Mar 28th, 2025, 01:36 PM
#30
Re: Image Annotation & Markup Tools (RC6/Cairo Based)
 Originally Posted by Mojtaba
Hi jpbro, very good, thank you.
Glad you like it 
 Originally Posted by Mojtaba
I don't know why the software takes so long to load for me!
You probably have a lot of fonts - the demo app/form loads all fonts into the combobox and it is quite slow. The more fonts, the worse it gets. There are better ways to populate combos with fonts, but they're outside the scope of this demo (here's one example by LaVolpe)
 Originally Posted by Mojtaba
I have a suggestion: add a ruler. And maybe guide lines
It's a good idea, but I'm not sure I want to add them as features to the base class. Instead I have decided on the concept of an Underlay and Overlay layer. The underlay appears above the base background image and below the annotation layer. The overlay appears above all other layers.
There are 2 new events: BeforeRenderUnderlay and BeforeRenderOverlay, each of which provide a cCairoContext that you can draw anything you like against. The underlay would be good for rulers, and the overlay would be good for something like tooltips/coordinate reporting that follows the mouse.

NOTE: In the above image, the yellow diagonal line is painted on the underlay layer (drawing under the polygon in the annotation layer). The green diagonal line appears in the overlay layer (drawing over the polygon in the annotation layer).
I'll probably need to add some additional features to make this more useful (like exposing the mouse coords, and zoom factor so that you can adjust ruler values appropriately), but it's a good starting point if you want to play around with it and report back with any problems or places where it lacks necessary info you need to draw what you would like.
Last edited by jpbro; Mar 29th, 2025 at 07:06 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|