Re: [mapserver-users] bug in mapscript colorObj ?

2011-10-06 Thread Jachym Cepicky

Daniel,

problem is, that the COLOR object is *not* written to mapfile, when one 
of the RGB components is set to -1


It can be seen in the script, I send in my previous e-mail and, I 
created ticket to this


http://trac.osgeo.org/mapserver/ticket/4042

Thanks

Jachym

On 1.10.2011 16:45, Daniel Morissette wrote:

On 11-09-30 07:12 AM, Jachym Cepicky wrote:

Hi,

I try to set transparent color to REFERENCE map, so that the box is
outlined-only.

According to documentation, i use -1 for indication, that the color
should be transparent

color = mapscript.colorObj(-1,-1,-1)



How do you set/assign the color value to the reference map object? What
if you set another color than -1,-1,-1, does it get through?

The following works fine for me in PHP MapScript. Perhaps make a similar
test with the version of MapScript you are using (Python?), and then
look at the output of /tmp/test.map to comfirm that the color is set as
expected.

?php
$map = ms_newMapObj(/path/to/my.map);
$map-reference-color-setRGB(-1,-1,-1);
$map-save(/tmp/test.map);
?


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] bug in mapscript colorObj ?

2011-10-06 Thread Daniel Morissette

On 11-10-06 05:11 AM, Jachym Cepicky wrote:

Daniel,

problem is, that the COLOR object is *not* written to mapfile, when one
of the RGB components is set to -1

It can be seen in the script, I send in my previous e-mail and, I
created ticket to this

http://trac.osgeo.org/mapserver/ticket/4042



I checked and confirmed that there is a bug in the mapObj.save() method. 
However, the behavior that we got confirms that the -1,-1,-1 value is 
properly accepted and set by MapScript. Please see ticket #4042 for the 
full story.


With similar code in PHP MapScript, I am able to get a red outline with 
transparent fill on the reference map. I'm not setup to test with Python 
myself, so I'll leave it to someone else to investigate if you confirm 
that you still cannot get a red outline with transparent fill on your 
reference maps.


Daniel
--
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] bug in mapscript colorObj ?

2011-10-05 Thread Jachym Cepicky

Daniel,


I have prepared another set of scripts and input data (attached)

And it seems to me, that it works in this basic environment.

I'll do another check, to find out, why it does not work in the more 
complex script.


Thanks Daniel for your time

Jachym

On 1.10.2011 16:45, Daniel Morissette wrote:

On 11-09-30 07:12 AM, Jachym Cepicky wrote:

Hi,

I try to set transparent color to REFERENCE map, so that the box is
outlined-only.

According to documentation, i use -1 for indication, that the color
should be transparent

color = mapscript.colorObj(-1,-1,-1)



How do you set/assign the color value to the reference map object? What
if you set another color than -1,-1,-1, does it get through?

The following works fine for me in PHP MapScript. Perhaps make a similar
test with the version of MapScript you are using (Python?), and then
look at the output of /tmp/test.map to comfirm that the color is set as
expected.

?php
$map = ms_newMapObj(/path/to/my.map);
$map-reference-color-setRGB(-1,-1,-1);
$map-save(/tmp/test.map);
?



reference.tgz
Description: application/compressed-tar
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] bug in mapscript colorObj ?

2011-10-01 Thread Daniel Morissette

On 11-09-30 07:12 AM, Jachym Cepicky wrote:

Hi,

I try to set transparent color to REFERENCE map, so that the box is
outlined-only.

According to documentation, i use -1 for indication, that the color
should be transparent

color = mapscript.colorObj(-1,-1,-1)



How do you set/assign the color value to the reference map object? What 
if you set another color than -1,-1,-1, does it get through?


The following works fine for me in PHP MapScript. Perhaps make a similar 
test with the version of MapScript you are using (Python?), and then 
look at the output of /tmp/test.map to comfirm that the color is set as 
expected.


?php
  $map = ms_newMapObj(/path/to/my.map);
  $map-reference-color-setRGB(-1,-1,-1);
  $map-save(/tmp/test.map);
?

--
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] bug in mapscript colorObj ?

2011-09-30 Thread Jachym Cepicky

Hi,

I try to set transparent color to REFERENCE map, so that the box is 
outlined-only.


According to documentation, i use -1 for indication, that the color 
should be transparent


color = mapscript.colorObj(-1,-1,-1)

but this seems to be understood as invalid color, according to

#define MS_VALID_COLOR(color) (((color).red==-1 || (color).green==-1 ||
(color).blue==-1)?MS_FALSE:MS_TRUE)


and the box is filled with red color (default value)

When I use -255 for the colors triplet, it is converted to positive 
integer (and so the box is black).


When I tried to set alpha directly

color.alpha = 0

It did not help

Any hint what to do? Is that a bug in mapserver/mapscript ?

Jachym

P.S. Sorry for cross posting, not sure, where to find the right answer.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users