[GRASS5] vector line thickness implemented - was Re: R_line_width()

On Tue, Aug 09, 2005 at 01:35:48AM -0500, Huidae Cho wrote:

Hi,

I added 'int R_line_width(int width)' to the raster library. This
changes line width for Draw_line().

Huidae Cho

Hi Huidae,

this is ABSOLUTELY GREAT! I think we discussed it for years...

To all: find attached a small screenshot of d.vect using the
line width feature for the roads map.

Congratulations,

Markus

(attachments)

grass61_vector_linewidth.jpg

Hi Huidae,

I have just tried the new line width option and it works great.

Unfortunately I think I have discovered a side-effect from it. If you draw another line feature after drawing a vector with the width option it is drawn at whatever width the vector was drawn at. For example if you draw a vector with width=3 and then draw a grid and barscale (for example) the grid and barscale are drawn with the same heavy line.

Is it possible to reset the line width at the end of a draw to avoid this problem?

--
Bob Covill

Markus Neteler wrote:

On Tue, Aug 09, 2005 at 01:35:48AM -0500, Huidae Cho wrote:

Hi,

I added 'int R_line_width(int width)' to the raster library. This
changes line width for Draw_line().

Huidae Cho

Hi Huidae,

this is ABSOLUTELY GREAT! I think we discussed it for years...

To all: find attached a small screenshot of d.vect using the
line width feature for the roads map.

Congratulations,

Markus

------------------------------------------------------------------------

Hmm, it seems that R_color() has the same problem if it's not called by
the next drawing module. When I commented out R_color() block (lines
139-143) in display/d.grid/main.c, it draws grid lines with the last
color d.vect used.

In terms of consistency, current R_line_width() looks OK. But since it's
new feature, no drawing module takes into account this side effect or
some modules even don't need this feature. For the latter case, it will
be simple to modify d.vect. Check out the latest CVS version.

Thank you.
Huidae Cho

On Tue, Aug 09, 2005 at 10:05:07AM -0300, Bob Covill wrote:

Hi Huidae,

I have just tried the new line width option and it works great.

Unfortunately I think I have discovered a side-effect from it. If you
draw another line feature after drawing a vector with the width option
it is drawn at whatever width the vector was drawn at. For example if
you draw a vector with width=3 and then draw a grid and barscale (for
example) the grid and barscale are drawn with the same heavy line.

Is it possible to reset the line width at the end of a draw to avoid
this problem?

--
Bob Covill

Markus Neteler wrote:
>On Tue, Aug 09, 2005 at 01:35:48AM -0500, Huidae Cho wrote:
>
>>Hi,
>>
>>I added 'int R_line_width(int width)' to the raster library. This
>>changes line width for Draw_line().
>>
>>Huidae Cho
>
>
>Hi Huidae,
>
>this is ABSOLUTELY GREAT! I think we discussed it for years...
>
>To all: find attached a small screenshot of d.vect using the
>line width feature for the roads map.
>
>Congratulations,
>
> Markus
>
>
>
>------------------------------------------------------------------------
>

I'll second Markus. How do we add it to d.vect?

Michael
______________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Markus Neteler <neteler@itc.it>
Date: Tue, 9 Aug 2005 11:00:37 +0200
To: Huidae Cho <grass4u@gmail.com>
Cc: <grass5@grass.itc.it>
Subject: [GRASS5] vector line thickness implemented - was Re: R_line_width()

On Tue, Aug 09, 2005 at 01:35:48AM -0500, Huidae Cho wrote:

Hi,

I added 'int R_line_width(int width)' to the raster library. This
changes line width for Draw_line().

Huidae Cho

Hi Huidae,

this is ABSOLUTELY GREAT! I think we discussed it for years...

To all: find attached a small screenshot of d.vect using the
line width feature for the roads map.

Congratulations,

Markus

Michael,

it *is* already in d.vect :slight_smile:

That's how I made the screenshot. Ready to test.

Markus

On Tue, Aug 09, 2005 at 11:13:07AM -0700, Michael Barton wrote:

I'll second Markus. How do we add it to d.vect?

Michael
______________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

> From: Markus Neteler <neteler@itc.it>
> Date: Tue, 9 Aug 2005 11:00:37 +0200
> To: Huidae Cho <grass4u@gmail.com>
> Cc: <grass5@grass.itc.it>
> Subject: [GRASS5] vector line thickness implemented - was Re: R_line_width()
>
> On Tue, Aug 09, 2005 at 01:35:48AM -0500, Huidae Cho wrote:
>> Hi,
>>
>> I added 'int R_line_width(int width)' to the raster library. This
>> changes line width for Draw_line().
>>
>> Huidae Cho
>
> Hi Huidae,
>
> this is ABSOLUTELY GREAT! I think we discussed it for years...
>
> To all: find attached a small screenshot of d.vect using the
> line width feature for the roads map.
>
> Congratulations,
>
> Markus
>

--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

Markus,

What is the command for line width. I looked in the on-line manual for GRASS
6.1 and couldn't find it. Maybe added too recently to show up? I'm happy to
add it to the GIS Manager for vector display. Also is it an integer or can
it take a decimal?

Michael

On 8/9/05 12:46 PM, "Markus Neteler" <neteler@itc.it> wrote:

Michael,

it *is* already in d.vect :slight_smile:

That's how I made the screenshot. Ready to test.

Markus

On Tue, Aug 09, 2005 at 11:13:07AM -0700, Michael Barton wrote:

I'll second Markus. How do we add it to d.vect?

Michael
______________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Markus Neteler <neteler@itc.it>
Date: Tue, 9 Aug 2005 11:00:37 +0200
To: Huidae Cho <grass4u@gmail.com>
Cc: <grass5@grass.itc.it>
Subject: [GRASS5] vector line thickness implemented - was Re: R_line_width()

On Tue, Aug 09, 2005 at 01:35:48AM -0500, Huidae Cho wrote:

Hi,

I added 'int R_line_width(int width)' to the raster library. This
changes line width for Draw_line().

Huidae Cho

Hi Huidae,

this is ABSOLUTELY GREAT! I think we discussed it for years...

To all: find attached a small screenshot of d.vect using the
line width feature for the roads map.

Congratulations,

Markus

Hi Michael,

The feature has been added to d.vect. Check out the latest CVS version
and you will find 'width=' option in d.vect help. It takes only integer
values since the value is the number of pixels itself on the monitor.

Enjoy :wink:
Huidae Cho

On Tue, Aug 09, 2005 at 08:22:50PM -0700, Michael Barton wrote:

Markus,

What is the command for line width. I looked in the on-line manual for GRASS
6.1 and couldn't find it. Maybe added too recently to show up? I'm happy to
add it to the GIS Manager for vector display. Also is it an integer or can
it take a decimal?

Michael

On 8/9/05 12:46 PM, "Markus Neteler" <neteler@itc.it> wrote:

> Michael,
>
> it *is* already in d.vect :slight_smile:
>
> That's how I made the screenshot. Ready to test.
>
> Markus
>
> On Tue, Aug 09, 2005 at 11:13:07AM -0700, Michael Barton wrote:
>> I'll second Markus. How do we add it to d.vect?
>>
>> Michael
>> ______________________________
>> Michael Barton, Professor of Anthropology
>> School of Human Evolution and Social Change
>> Arizona State University
>> Tempe, AZ 85287-2402
>> USA
>>
>> voice: 480-965-6262; fax: 480-965-7671
>> www: http://www.public.asu.edu/~cmbarton
>>
>>
>>> From: Markus Neteler <neteler@itc.it>
>>> Date: Tue, 9 Aug 2005 11:00:37 +0200
>>> To: Huidae Cho <grass4u@gmail.com>
>>> Cc: <grass5@grass.itc.it>
>>> Subject: [GRASS5] vector line thickness implemented - was Re: R_line_width()
>>>
>>> On Tue, Aug 09, 2005 at 01:35:48AM -0500, Huidae Cho wrote:
>>>> Hi,
>>>>
>>>> I added 'int R_line_width(int width)' to the raster library. This
>>>> changes line width for Draw_line().
>>>>
>>>> Huidae Cho
>>>
>>> Hi Huidae,
>>>
>>> this is ABSOLUTELY GREAT! I think we discussed it for years...
>>>
>>> To all: find attached a small screenshot of d.vect using the
>>> line width feature for the roads map.
>>>
>>> Congratulations,
>>>
>>> Markus
>>>
>>

_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

Thanks Huidae,

This is an enormous improvement and will make a lot of people happy. I'm in
the midst of an office/lab reorganization at the moment, but as soon as it's
done (hopefully tomorrow) I'll add this to the GIS Manager, probably as an
integer spinner.

Michael

On 8/9/05 8:35 PM, "Huidae Cho" <grass4u@gmail.com> wrote:

Hi Michael,

The feature has been added to d.vect. Check out the latest CVS version
and you will find 'width=' option in d.vect help. It takes only integer
values since the value is the number of pixels itself on the monitor.

Enjoy :wink:
Huidae Cho

On Tue, Aug 09, 2005 at 08:22:50PM -0700, Michael Barton wrote:

Markus,

What is the command for line width. I looked in the on-line manual for GRASS
6.1 and couldn't find it. Maybe added too recently to show up? I'm happy to
add it to the GIS Manager for vector display. Also is it an integer or can
it take a decimal?

Michael

On 8/9/05 12:46 PM, "Markus Neteler" <neteler@itc.it> wrote:

Michael,

it *is* already in d.vect :slight_smile:

That's how I made the screenshot. Ready to test.

Markus

On Tue, Aug 09, 2005 at 11:13:07AM -0700, Michael Barton wrote:

I'll second Markus. How do we add it to d.vect?

Michael
______________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Markus Neteler <neteler@itc.it>
Date: Tue, 9 Aug 2005 11:00:37 +0200
To: Huidae Cho <grass4u@gmail.com>
Cc: <grass5@grass.itc.it>
Subject: [GRASS5] vector line thickness implemented - was Re:
R_line_width()

On Tue, Aug 09, 2005 at 01:35:48AM -0500, Huidae Cho wrote:

Hi,

I added 'int R_line_width(int width)' to the raster library. This
changes line width for Draw_line().

Huidae Cho

Hi Huidae,

this is ABSOLUTELY GREAT! I think we discussed it for years...

To all: find attached a small screenshot of d.vect using the
line width feature for the roads map.

Congratulations,

Markus

_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

Huidae Cho wrote:

Hmm, it seems that R_color() has the same problem if it's not called by
the next drawing module. When I commented out R_color() block (lines
139-143) in display/d.grid/main.c, it draws grid lines with the last
color d.vect used.

In terms of consistency, current R_line_width() looks OK. But since it's
new feature, no drawing module takes into account this side effect or
some modules even don't need this feature.

Exactly. Almost every module which uses drawing primitives which
depend upon the current colour (everything except for raster drawing
primitives) sets the current colour explicitly.

--
Glynn Clements <glynn@gclements.plus.com>