Thread View: adobe.postscript.programming
15 messages
15 total messages
Started by David_Cristian
Tue, 22 Jul 2008 15:11
stroke and fill
Author: David_Cristian
Date: Tue, 22 Jul 2008 15:11
Date: Tue, 22 Jul 2008 15:11
17 lines
1291 bytes
1291 bytes
I read in the PostScript documentation and i saw that stroke only has : -linecap -color -mitterlimit -linejoin -thickness I have to write an application and my class Stroke, that i am using, has a lot of other stuff like PatternBrush, ImageBrush ,GradientBrush , etc. Can i get this kind of options for stroke in a PostScript file? How about Fill? (I'm very interested in the gradient option. I haven't found so far very clear documentation about it) Can i get a detailed explanation or(and) some reference? David
Re: stroke and fill
Author: Aandi_Inston
Date: Tue, 22 Jul 2008 16:01
Date: Tue, 22 Jul 2008 16:01
6 lines
1011 bytes
1011 bytes
You can use a tiling pattern to produce an implementation of a brush. A pattern is, in effect, a color, so after using setcolorspace and setcolor to set a pattern color, fill, eofill, stroke, imagemask and the text operators will all paint with your brush. Aandi Inston
Re: stroke and fill
Author: David_Cristian
Date: Wed, 23 Jul 2008 08:01
Date: Wed, 23 Jul 2008 08:01
3 lines
841 bytes
841 bytes
Can you give me an answer about the second question (matrix transformation)? David
Re: stroke and fill
Author: Aandi_Inston
Date: Wed, 23 Jul 2008 08:27
Date: Wed, 23 Jul 2008 08:27
3 lines
729 bytes
729 bytes
"concat". Aandi Inston
Re: stroke and fill
Author: Aandi_Inston
Date: Wed, 23 Jul 2008 08:28
Date: Wed, 23 Jul 2008 08:28
5 lines
1002 bytes
1002 bytes
By the way, the PostScript Reference is the complete definition of shadings. Does anything seem to be missing (rather than awesomely complicated?) Aandi Inston
Re: stroke and fill
Author: David_Cristian
Date: Wed, 23 Jul 2008 10:48
Date: Wed, 23 Jul 2008 10:48
4 lines
701 bytes
701 bytes
It is a lot to read and I lost myself a little bit. I'm sorry if I ask too silly questions . David
Re: stroke and fill
Author: David_Cristian
Date: Thu, 24 Jul 2008 08:46
Date: Thu, 24 Jul 2008 08:46
16 lines
867 bytes
867 bytes
I have another question. I tried to draw a line with the following color: 200 143 120 setrgbcolor and it doesn't seem to work if i change only that line like: 255 0 0 setrgbcolor it draws a red line. What am I doing wrong? David
Re: stroke and fill
Author: Aandi_Inston
Date: Thu, 24 Jul 2008 09:59
Date: Thu, 24 Jul 2008 09:59
11 lines
1188 bytes
1188 bytes
You are not using the correct ranges for the color values. You are assuming that they lie in the range 0 to 255, but that is not the case. See "DeviceRGB color space" in 4.8.2. Each color space may have different colorant ranges. You may have seen 0..255 in RGB PostScript images, but this is just a representation to be scaled to the true value using the (supplied or default) Decode values. It would be 0..15 in a 4-bits-per-component image, to represent the same range of values. Aandi Inston
Re: stroke and fill
Author: David_Cristian
Date: Thu, 24 Jul 2008 10:18
Date: Thu, 24 Jul 2008 10:18
4 lines
846 bytes
846 bytes
I got it. And another thing, if i am using a hexadecimal representation for images, does bits per component gives the info about how many colors it can use to draw it I am interested to 3 and 4. David
Re: stroke and fill
Author: Aandi_Inston
Date: Thu, 24 Jul 2008 10:24
Date: Thu, 24 Jul 2008 10:24
12 lines
1190 bytes
1190 bytes
BitsPerComponent indicates how many bits are used to store each component and nothing else. But it does limit the number of separate colours. For example, with 4 bits per component, there are 16 possible values to a component. An RGB image with 4 bits per component would therefore have 16 x 16 x 16 possible distinct colours. But I sense you are asking about something else, when you say you are interested in "3 and 4". Can you give more details? Aandi Inston
Re: stroke and fill
Author: David_Cristian
Date: Thu, 24 Jul 2008 10:34
Date: Thu, 24 Jul 2008 10:34
3 lines
689 bytes
689 bytes
My goal is to draw the images using RGB or CMYK for representing every component. David
Re: stroke and fill
Author: Aandi_Inston
Date: Thu, 24 Jul 2008 11:00
Date: Thu, 24 Jul 2008 11:00
5 lines
947 bytes
947 bytes
>My goal is to draw the images using RGB or CMYK for representing every component. Ok... but what is the question, related to bits per component? Aandi Inston
Re: stroke and fill
Author: David_Cristian
Date: Thu, 24 Jul 2008 11:14
Date: Thu, 24 Jul 2008 11:14
5 lines
895 bytes
895 bytes
My question is actually the following: How can I draw an image using 3 or 4 colors . Actually this is my task and I don't really understand, after reading the documentation, what I have to do and I thought the answer was in the bits per component parameter. David.
Re: stroke and fill
Author: Aandi_Inston
Date: Thu, 24 Jul 2008 11:41
Date: Thu, 24 Jul 2008 11:41
10 lines
982 bytes
982 bytes
You mean that the entire image will be made up of 3 colours, such as RGB=10%,50%,0% RGB=70%,14%,80% RGB=80%,80%,80% and there will be no other colours in the image? If so, this is an ideal case for an Indexed colour space. You could then use just 2 bits per component. Aandi Inston
Re: stroke and fill
Author: David_Cristian
Date: Thu, 24 Jul 2008 13:03
Date: Thu, 24 Jul 2008 13:03
10 lines
1068 bytes
1068 bytes
Let me get straight another thing. When the postscript interpreter sees raw data and after that he sees for example (8 bits per component) false 3 colorimage ... He will analyze the data and associate a color to every 3 bytes(that means R G B i know 3 is for RGB)? Ex : ffff 0000 0000 => Red With 4 => he will get a color at every 4 bytes (CMYK)? So if I want to associate to every component a CMYK correspondent , i will have to make a conversion, ... no?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads