Hi<br><br>The GrassQt code is not part of QGIS and I dont think there is anyone on this list who is able to help you with your problem :-( I suggest using the email form on the grassqt website to further your query:<br><br>
<a href="http://navicon.dk/web/contact.php?pageid=45">http://navicon.dk/web/contact.php?pageid=45</a><br><br>I'm sorry we cant be of more assistance.<br><br>Regards<br><br>Tim<br><br><div><span class="gmail_quote">On 21 Apr 2006 04:04:57 -0000, 
<b class="gmail_sendername">Nitin quick</b> &lt;<a href="mailto:quickuser@rediffmail.com">quickuser@rediffmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;"><p>
&nbsp; <br>
Hello Tim<br>
I am sorry i didn't provided with enough infomation. Actually the code i am talking about is not completely mine. Its a GRASSQt code which itried to modify sop that it can use current vector library of grass.GrassQt was originally written for 
grass5.0+ support. <br>
Code i am putting here is the one which reads the map lines( lines only) and pass it to Qpainter. I am not clear which part of code to attch. I am also attaching 2 screen shots of soils vector map in spearfish60 dataset. One having red background and white foreground(
snapshiot2.png) is the one mine and other screen shot is of actual output(snapshot4) generated using grass.<br>
<br>
<br>
/this code is responsible for displaying of reading of line and sending to painter*/<br>
<br>
void GRASSVectorLayer::linePlot(QPainter* p) {<br>
&nbsp; int nlines = Vect_get_num_lines (&amp;P_map);<br>
&nbsp; int j=0; &nbsp; &nbsp; &nbsp;<br>
&nbsp; &nbsp; &nbsp;printf(&quot; \n:+: no of lines in map %d VectorLayer.cpp-72-&quot;,nlines);<br>
&nbsp;  struct line_cats* _cats = Vect_new_cats_struct(); <br>
/* declared to make it compatible with the grass 6+, newer vector library */<br>
&nbsp; p-&gt;setPen(Qt::white);// originally was _penColor <br>
&nbsp; <br>
&nbsp; if(0!=Vect_set_constraint_region (&amp;P_map, _painter-&gt;grassRegion().north,<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; _painter-&gt;grassRegion().south, <br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; _painter-&gt;grassRegion().east, <br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; _painter-&gt;grassRegion().west,<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;_painter-&gt;grassRegion().top,<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;_painter-&gt;grassRegion().bottom&nbsp; &nbsp; &nbsp;))<br>
&nbsp; &nbsp; &nbsp;printf(&quot;\n:+: Vect_set_constraint_region returns error &quot;); <br>
&nbsp; <br>
&nbsp; if(Vect_rewind(&amp;P_map)==-1)<br>
&nbsp; &nbsp; &nbsp;printf(&quot;\n:+: Error Vect_rewind &quot;);<br>
&nbsp; <br>
&nbsp; while (1) {<br>
&nbsp; &nbsp; int ret; j++;// j counts no of lines added by painter<br>
&nbsp; &nbsp; if (0 &gt; (ret = Vect_read_next_line (&amp;P_map, _points,_cats))) {/* _cats added as argument */<br>
&nbsp; &nbsp; &nbsp; if (ret == -1)<br>
&nbsp; &nbsp; &nbsp;G_warning (&quot;Read error at VectorLayer.cpp-91- breaking\n&quot;);<br>
&nbsp; &nbsp; &nbsp; break;<br>
&nbsp; &nbsp; }<br>
&nbsp; &nbsp; int np = _points-&gt;n_points;//GRASSVectorLayer::linePlot read VectorLayer.cpp<br>
&nbsp; &nbsp; &nbsp; cout &lt;&lt; &quot;\t&quot; &lt;&lt; np &lt;&lt; &quot; points&quot;;<br>
&nbsp; &nbsp; double* x&nbsp; = _points-&gt;x;<br>
&nbsp; &nbsp; double* y =&nbsp; _points-&gt;y;<br>
&nbsp; &nbsp; &nbsp;//printf(&quot; :+:&quot;);<br>
&nbsp; &nbsp; /*if( np==1)<br>
&nbsp; &nbsp; &nbsp;{ plot_line(x[0],y[0],x[0],y[0],p); j++;}<br>
&nbsp; &nbsp; else*/<br>
&nbsp; &nbsp; <br>
&nbsp; &nbsp; &nbsp; for (int i=1; i &lt; np; i++) <br>
&nbsp; &nbsp; &nbsp;{<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; plot_line (x[i-1], y[i-1], x[i], y[i], p);<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; x++;&nbsp; &nbsp;  y++;<br>
&nbsp; &nbsp; &nbsp; &nbsp; }<br>
&nbsp; }<br>
&nbsp; &nbsp; &nbsp;printf(&quot;\n :+:Drawing donne %d lines printed -108-Vectorlayer.cpp\t&quot;,j); //this can't be done here<br>
}<br>
<br>
#define X(e) (_painter-&gt;D.D_u_to_d_col(e))<br>
#define Y(n) (_painter-&gt;D.D_u_to_d_row(n))<br>
<br>
<br>
int GRASSVectorLayer::plot_line(double east1,double north1,<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;double east2,double north2, QPainter* p) <br>
{<br>
&nbsp; &nbsp; double x1,x2,y1,y2;<br>
<br>
&nbsp; &nbsp; y1 = Y(north1);<br>
&nbsp; &nbsp; y2 = Y(north2);<br>
<br>
&nbsp; &nbsp; if (_painter-&gt;grassRegion().proj == PROJECTION_LL)<br>
&nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp;if (east1 &gt; east2)<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; while ((east1-east2) &gt; 180)<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;east2 += 360;<br>
&nbsp; &nbsp; &nbsp;else if (east2 &gt; east1)<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; while ((east2-east1) &gt; 180)<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;east1 += 360;<br>
&nbsp; &nbsp; &nbsp;while (east1 &gt; _painter-&gt;grassRegion().east)<br>
&nbsp; &nbsp; &nbsp;{<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; east1 -= 360.0;<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; east2 -= 360.0;<br>
&nbsp; &nbsp; &nbsp;}<br>
&nbsp; &nbsp; &nbsp;while (east1 &lt; _painter-&gt;grassRegion().west)<br>
&nbsp; &nbsp; &nbsp;{<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; east1 += 360.0;<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; east2 += 360.0;<br>
&nbsp; &nbsp; &nbsp;}<br>
&nbsp; &nbsp; &nbsp;x1 = X(east1);<br>
&nbsp; &nbsp; &nbsp;x2 = X(east2);<br>
<br>
&nbsp; &nbsp; &nbsp;//p-&gt;moveTo(x1, y1);<br>
&nbsp; &nbsp; &nbsp;//p-&gt;lineTo(x2, y2);<br>
&nbsp; &nbsp; &nbsp;p-&gt;drawLine(x1,y1,x2,y1);<br>
&nbsp; &nbsp; &nbsp;if (east2 &gt; _painter-&gt;grassRegion().east || east2 &lt; _painter-&gt;grassRegion().west)<br>
&nbsp; &nbsp; &nbsp;{<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; while (east2 &gt; _painter-&gt;grassRegion().east)<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;east1 -= 360.0;<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;east2 -= 360.0;<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; }<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; while (east2 &lt; _painter-&gt;grassRegion().west)<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;east1 += 360.0;<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;east2 += 360.0;<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; }<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; x1 = X(east1);<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; x2 = X(east2);<br>
&nbsp; &nbsp; &nbsp;&nbsp; //&nbsp; p-&gt;moveTo(x1, y1);<br>
&nbsp; &nbsp; &nbsp;&nbsp;  // p-&gt;lineTo(x2, y2);<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br>
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; p-&gt;drawLine(x1,y1,x2,y2);<br>
&nbsp; &nbsp; &nbsp;}<br>
&nbsp; &nbsp; }<br>
&nbsp; &nbsp; else<br>
&nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp;x1 = X(east1);<br>
&nbsp; &nbsp; &nbsp;x2 = X(east2);<br>
&nbsp; &nbsp; &nbsp;//p-&gt;moveTo(x1, y1);<br>
&nbsp; &nbsp; &nbsp;//p-&gt;lineTo(x2, y2);<br>
&nbsp; &nbsp; &nbsp;<br>
&nbsp; &nbsp; &nbsp;p-&gt;drawLine(x1,y1,x2,y2);<br>
&nbsp; &nbsp; }<br>
<br>
&nbsp; &nbsp; return 0;<br>
}<br>
thanks<br>
cya <br>
nitin <br>
<br>
On Thu, 20 Apr 2006 Tim Sutton wrote :<br>
&gt;Hi Nitin<br>
&gt;<br>
&gt;Can you provide a better explanation? Some background information on<br>
&gt;what it is you are trying to achieve? Some source code for us to look<br>
&gt;at? Some screenshots?<br>
&gt;<br>
&gt;Thanks<br>
&gt;<br>
&gt;Tim<br>
&gt;<br>
&gt;On 20 Apr 2006 12:42:59 -0000, Nitin quick &lt;<a href="mailto:quickuser@rediffmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">quickuser@rediffmail.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;&nbsp; hello Group<br>
&gt; &gt;&nbsp; I am a newbee in GIS development.<br>
&gt; &gt;&nbsp; I read the GRASS Sample data &quot;spearfish60&quot; using grass 6.0.1 vector library line by line, and displayed it using Qpainter and QCanvas but output is no the exact map. Some distorted lines has come in. Also lines printed are not of same no as total no of lines in Map.
<br>
&gt; &gt;<br>
&gt; &gt;&nbsp; any help is welcome,<br>
&gt; &gt;<br>
&gt; &gt;&nbsp; cya<br>
&gt; &gt;&nbsp; nitin<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Qgis-developer mailing list<br>
&gt; &gt; <a href="mailto:Qgis-developer@lists.qgis.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Qgis-developer@lists.qgis.org</a><br>
&gt; &gt; <a href="http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer</a><br>

&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;--<br>
&gt;Tim Sutton<br>
&gt;<br>
&gt;Visit <a href="http://qgis.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://qgis.org</a> for a great Open Source GIS<br>
&gt;Skype: timlinux<br>
&gt;MSN: <a href="mailto:tim_bdworld@msn.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">tim_bdworld@msn.com</a><br>
&gt;Yahoo: <a href="mailto:tim_bdworld@yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">tim_bdworld@yahoo.com</a><br>
&gt;Jabber: timlinux<br>
&gt;Irc: timlinux on #qgis at <a href="http://freenode.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">freenode.net</a><br>

</p>
<br><br>
<a href="http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"><img border="0" hspace="0" vspace="0">
</a>

</div><br clear="all"></blockquote></div><br><br clear="all"><br>-- <br>Tim Sutton<br><br>Visit <a href="http://qgis.org">http://qgis.org</a> for a great Open Source GIS<br>Skype: timlinux<br>MSN: <a href="mailto:tim_bdworld@msn.com">
tim_bdworld@msn.com</a><br>Yahoo: <a href="mailto:tim_bdworld@yahoo.com">tim_bdworld@yahoo.com</a><br>Jabber: timlinux<br>Irc: timlinux on #qgis at <a href="http://freenode.net">freenode.net</a>