Click to See Complete Forum and Search --> : Looking for path function in linux


joeshro
08-01-2003, 08:21 AM
In windows GDI API, there is a group of functions to support path, like
BOOL BeginPath(HDC hDC);
BOOL AbortPath(HDC hDC);
BOOL FillPath(HDC hDC); etc.
What's the couterpoint in Linux?

GaryJones32
08-01-2003, 12:13 PM
might have to tell us what those thing do.
or better yet what you are trying to do.

Stuka
08-01-2003, 12:22 PM
Those are graphical drawing functions in Windows. Since Linux doesn't have a directly-OS supported graphics API like Windows, you'll have to decide on how you're going to do your GUI stuff, and find the correct functions for that toolkit. Since you appear to be interested in C functions, take a look at the GTK+ information at www.gtk.org - it should get you started.

joeshro
08-01-2003, 08:41 PM
Originally posted by Stuka
Those are graphical drawing functions in Windows. Since Linux doesn't have a directly-OS supported graphics API like Windows, you'll have to decide on how you're going to do your GUI stuff, and find the correct functions for that toolkit. Since you appear to be interested in C functions, take a look at the GTK+ information at www.gtk.org - it should get you started.
I'd like to draw all the items by myself, from the point to the line, the curve, etc. So what I need is a based 2D function package, but it should support path. Need C functions. (Because those functions, we are able to draw the owner-draw controls by ourselves in windows)

joeshro
08-01-2003, 10:05 PM
Originally posted by GaryJones32
might have to tell us what those thing do.
or better yet what you are trying to do.
In windows, we collect the path from calling the function BeginPath, "The BeginPath function opens a path bracket in the specified device context. After a path bracket is open, an application can begin calling GDI drawing functions to define the points that lie in the path. An application can close an open path bracket by calling the EndPath function. ", after that, we can use other function to get the path object, then we can fill it like those normal graphical object, rectangle, for example. So, the path is the object we can used to create arbitrary graphical objects.

kmj
08-02-2003, 11:28 AM
weird; I'm totally unfamiliar with this aspect of windows programming. I have never heard of this "path" idiom, and I'm not exactly sure why you'd need it to create arbitrary graphical arguments. I guess that's kind of irrelevant, both Qt and Gtk support painting, but afaik, neither use this "path" concept. I do suggest you also take a look at SDL (the Simple DirectMedia Layer) :

http://www.libsdl.org/intro/toc.html

This is what Loki used to port all those win32 games to linux.

joeshro
08-03-2003, 02:02 AM
I'm not familiar with programming with linux, so, just tell me what library can I use if I want to: draw pixel & draw line & draw bezier & draw rectangle & draw arc & draw oval etc.