I have successfully implemented much of the c api using C#, but I
cannot figure out where to get the information I need to draw the
map to the window and allow zoom in/out. I need the bounding box, in
world coordinates, for the entire layer. Is there a way to get this
information using the c api? Below is some sample code I am using to
retreive the X, Y coords for a point based layer:
for(int iPointCounter=0;iPointCounter<iPointCount;iPointCounter++)
{
Point pt = new Point();
dX = mitab_c_get_vertex_x(iFID, iPartCounter, iPointCounter);
dY = mitab_c_get_vertex_y(iFID, iPartCounter, iPointCounter);
pt.X = Convert.ToInt32(Convert dX here to screen coords);
pt.Y = Convert.ToInt32(Convert dY here to screen coords);
int iPenColor = mitab_c_get_pen_color(iFID);
int iPenWidth = mitab_c_get_pen_width(iFID);
int iPenPattern = mitab_c_get_pen_pattern(iFID);
R = iPenColor / 65536 ;
G = (iPenColor - R*65536) / 256 ;
B = iPenColor - R*65536 - G*256 ;
brushDraw.Color = Color.FromArgb(R, G, B);
g.FillRectangle(brushDraw, pt.X, pt.Y, iPenWidth, iPenWidth);
}
If I know the bounding box, in world coordiantes, its quite easy to
do the conversion to screen coordinates, but I can't seem to get
this info back using the c api. Any help would be greatly
appreciated, and I can provide more sample code of what I am doing
if needed.
Thanks in advance,
Chris
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/mitab/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/