Ecere SDK/eC Forums • View topic - Drawing




Ecere SDK/eC Forums

Ecere Developers Community

Drawing

General help with the Ecere Cross Platform GUI toolkit: Window, common controls, events, etc.
Help with the 2D Graphics library: Surface, Display, Bitmap, Font and others.

Drawing

Postby samsam598 » Tue Aug 27, 2013 8:44 am

Greetings!

I recalled I've asked whether there is a 2D Drawing class to let me draw some 2D stuffs,like pie,ellipse ,rounded rectangle,brushes,regions etc,something MS called device context or GDI+ drawing.Possibly I describled my question in a wrong way.

What I acually want to do is just with whatever utils/class/tools in ecere,I can do this.That will be great.

You may refer to the attached pictures for your easy refernce.

Could you please figure me out where should I start?Appreciated.

Regards,
Sam
Attachments
regions.png
(5.34 KiB) Not downloaded yet
shapes.png
(7.42 KiB) Not downloaded yet
plots.JPG
samsam598
 
Posts: 208
Joined: Thu Apr 14, 2011 9:44 pm

Re: Drawing

Postby jerome » Tue Aug 27, 2013 10:28 am

Hi Sam, we were planning to add all these shapes at some point, except for the spline curve you have in there. (We probably should add it as well).

As for the regions, I'm not sure what that is, that looks like some special raster operations (COPY / AND / OR / XOR / NOT) for the fills with special colors for results? I'm not sure what kind of API would allow you to do this easily.

As for your plots screenshots, I believe you can do all this easily with the current API. You can use Area() to render the filled regions, Rectangle() for borders, DrawLine() for rendering the lines/curves and PutPixel() if you need finer control, like perhaps for this 2D Histogram graphics.

One thing you may have trouble doing though is vertical text, I don't think we have support in for that yet, but we'll put it on our list of things to add!

To clarify, our 2D class at the moment drawing is the Surface object, so everything we currently support is within Surface, and that is likely where new functionality will be added.
At the moment it's mostly geared towards drawing simple GUI controls, bitmaps and text, so it is somewhat limited. It is also possible (but inconvenient) to use the low level 3D drawing primitives from the Display class in OpenGL or Direct3D mode to render these shapes, but would require a lot of code (We hope to make this more accessible in a 2D drawing mode).

Regards,

Jerome
jerome
Site Admin
 
Posts: 622
Joined: Sat Jan 16, 2010 11:16 pm


Return to GUI Toolkit & 2D Graphics

Who is online

Users browsing this forum: No registered users and 1 guest

cron