02-19-2009 01:00 PM
In the sample code that's provided with JDE 4.7, theres a project called MapFieldDemo. It uses to the function Graphics.drawFilledPath in one of its classes. I looked at the values of the xypoints[] arrays during runtime, and i got values for x to be in -20000 range, and y values to be in 12400 range. I noticed its using the style for graphic to be DRAWSTYLE_AAPOLYGONS. Now the points range does not make sense to me.
I also tried using this functio with values ranging fom 30-200, but nothing to show for on the screen.
Can someone elobrate on this function usage?
Thanks
02-24-2009 10:48 AM
03-28-2009 09:50 PM
I'm trying to find out how to use this and drawPathOutline also and the other couple of variants.
I'm not seeing anything on the screen and I set the drawing style like you were....nothing.
Anybody used these????
Thx
-D
03-29-2009 02:19 AM
I got it working. This is very powerful. The reason it's put together the way it is is so you can do things like store your vertices and then put them together as triangles for maybe fast polygon fills that way (but it's already got polygon fills), or for assist in 3D rendering of surfaces, etc, etc..... The method allows you (if you wish) to keep your vertices seperate from your polygons....as there are typically less vertices than groups of vertices in a surface.
-Donald
08-07-2009 06:34 AM
Hi all,
How can i make use of the drawpathoutline of graphics object. is there any samples on it.
Thanks and Regards,
PraveenGoparaju
08-07-2009 06:51 AM
I tried to post my entire graphics library source, but it said it was too big, so this is just one function....
/** * Draw the outline of the paths. * * @param none */ public void draw() { int x[] = m_vx.toArray(); int y[] = m_vy.toArray(); fp2int(x); // convert to rounded ints. fp2int(y); if (m_types.isEmpty()) { if (m_offsets.isEmpty()) { m_g.drawPathOutline(x,y,null,null,true); } else { int offsets[] = m_offsets.toArray(); m_g.drawPathOutline(x,y,null,offsets,true); } } else { byte types[] = m_types.toArray(); if (m_offsets.isEmpty()) { m_g.drawPathOutline(x,y,types,null,true); } else { int offsets[] = m_offsets.toArray(); m_g.drawPathOutline(x,y,types,offsets,true); } } } // draw
08-07-2009 11:12 AM