Hello Tim,<div><br></div><div>Thank&#39;s for your reply.</div><div><br></div><div>Sadly, no difference. Any other ideas?</div><div><br clear="all">Best regards,<br>------------------------------<br>Sérgio Cavalcante<br><br>


<br><br><div class="gmail_quote">On Tue, Aug 18, 2009 at 6:29 PM, Tim Sutton <span dir="ltr">&lt;<a href="mailto:lists@linfiniti.com">lists@linfiniti.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Hi<br>
<div><div></div><div class="h5"><br>
<br>
<br>
sergio cavalcante wrote:<br>
&gt; People, can anyone give me a little help with my transparency function?<br>
&gt; Here is it:<br>
&gt;<br>
&gt; void CViewPort::SetRasterTransparent(QgsRasterLayer * mRasterLayer)<br>
&gt;<br>
&gt; {<br>
&gt;<br>
&gt;   double myTransparentValue;<br>
&gt;<br>
&gt;   double myPercentTransparent;<br>
&gt;<br>
&gt;<br>
&gt;   QgsRasterTransparency::TransparentSingleValuePixel myTransparentPixel;<br>
&gt;<br>
&gt;   QList&lt;QgsRasterTransparency::TransparentSingleValuePixel&gt;<br>
&gt; myTransparentSingleValuePixelList;<br>
&gt;<br>
&gt;<br>
&gt;   myTransparentPixel.pixelValue = 0.00;<br>
&gt;<br>
&gt;   myTransparentPixel.percentTransparent = 100.00;<br>
&gt;<br>
&gt;   myTransparentSingleValuePixelList.append( myTransparentPixel );<br>
&gt;<br>
&gt;<br>
&gt;   myTransparentPixel.pixelValue = 65.00;<br>
&gt;<br>
&gt;   myTransparentPixel.percentTransparent = 100.00;<br>
&gt;<br>
&gt;   myTransparentSingleValuePixelList.append( myTransparentPixel );<br>
&gt;<br>
&gt;<br>
&gt;   mRasterLayer-&gt;rasterTransparency()-&gt;setTransparentSingleValuePixelList(<br>
&gt; myTransparentSingleValuePixelList );<br>
&gt;<br>
&gt; }<br>
&gt;<br>
&gt; The pixels I need to become transparent are the 0 and 65. I put the same<br>
&gt; values on the quantum gis application transparent pixel list and they become<br>
&gt; transparent, but I couldn&#39;t get the same result in my app.<br>
<br>
</div></div>Does calling:<br>
<br>
 mRasterLayer-&gt;triggerRepaint();<br>
<br>
at the end make any difference?<br>
<br>
Regards<br>
<br>
- --<br>
<br>
Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)<br>
==============================================<br>
Please do not email me off-list with technical<br>
support questions. Using the lists will gain<br>
more exposure for your issues and the knowledge<br>
surrounding your issue will be shared with all.<br>
<br>
Visit <a href="http://linfiniti.com" target="_blank">http://linfiniti.com</a> to find out about:<br>
 * QGIS programming and support services<br>
 * Mapserver and PostGIS based hosting plans<br>
 * FOSS Consulting Services<br>
Skype: timlinux<br>
Irc: timlinux on #qgis at <a href="http://freenode.net" target="_blank">freenode.net</a><br>
==============================================<br>
<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.9 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org" target="_blank">http://enigmail.mozdev.org</a><br>
<br>
iEYEARECAAYFAkqLHTAACgkQqk07qZdiYjdATACfVDRkxiODPGBiaLNsqeqNV0PC<br>
Xo0AniB2GQRY+wzpW7ZOyAQXRzq1XHAH<br>
=pS5H<br>
-----END PGP SIGNATURE-----<br>
</blockquote></div><br></div>