[mapserver-users] Setting Up Color in ms_newpointobj Object

Luca Pescatore info at pescatoreluca.com
Wed Dec 19 12:17:41 PST 2001


How can i set color in a ms_newpointobj object ?

$map Map Object
$oLayer Layer Object
$img Img Object

$oPixelPos = ms_newpointobj();
$oPixelPos->setXY($geoX, $geoY);
$valore = $oPixelPos->draw($map, $oLayer, $img, 0, "123");

ColorObj Class may help because Instances of ColorObj are always
embedded inside other classes, but if i try to use setRGB(int red, int 
green, int blue)
like $oPixelPos->setRGB($red, $green, $blue); i get this error : Call to 
undefined function: setrgb...

E.g.
$oPixelPos = ms_newpointobj();
$oPixelPos->setRGB(0, 0, 0);
$oPixelPos->setXY($geoX, $geoY);
$valore = $oPixelPos->draw($map, $oLayer, $img, 0, "123");

Best Regards,
	Luca




More information about the MapServer-users mailing list