Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ps_setcolor(3) [debian man page]

PS_SETCOLOR(3)						     Library Functions Manual						    PS_SETCOLOR(3)

NAME
PS_setcolor -- Sets current color SYNOPSIS
#include <pslib.h> void PS_setcolor(PSDoc *psdoc, const char *type, const char *colorspace, float c1, float c2, float c3, float c4) DESCRIPTION
Sets the color for drawing, filling, or both. The colorspace should be one of 'gray', 'spot', 'rgb, 'cmyk', or 'pattern'. Depending on the colorspace either only the first, the first two, the first three all or remaining parameters will be used. If colorspace is 'pattern' then c1 must contain the pattern id as returned by PS_begin_pattern(3). If colorspace is 'spot' then the c1 must contain the spot color id as returned by PS_makespotcolor(3) and the c2 must contain the tint value for the color. The parameter type can be 'fillstroke', 'fill', or 'stroke'. BUGS
The second parameter is currently not in any case evaluated. The color is always set for filling and drawing just as if 'both' where passed. If you want to set the color to define a spot color from it, you will have to pass 'both' or 'fill', because PS_makespotcolor(3) utilizes the current fill color. SEE ALSO
PS_begin_pattern(3) AUTHOR
This manual page was written by Uwe Steinmann uwe@steinmann.cx. PS_SETCOLOR(3)

Check Out this Related Man Page

PS_BEGIN_PATTERN(3)							 1						       PS_BEGIN_PATTERN(3)

ps_begin_pattern - Start a new pattern

SYNOPSIS
int ps_begin_pattern (resource $psdoc, float $width, float $height, float $xstep, float $ystep, int $painttype) DESCRIPTION
Starts a new pattern. A pattern is like a page containing e.g. a drawing which can be used for filling areas. It is used like a color by calling ps_setcolor(3) and setting the color space to pattern. PARAMETERS
o $psdoc - Resource identifier of the postscript file as returned by ps_new(3). o $width - The width of the pattern in pixel. o $height - The height of the pattern in pixel. o $x-step - The distance in pixel of placements of the pattern in horizontal direction. o $y-step - The distance in pixel of placements of the pattern in vertical direction. o $painttype - Must be 1 or 2. RETURN VALUES
The identifier of the pattern or FALSE on failure. EXAMPLES
Example #1 Creating and using a pattern <?php $ps = ps_new(); if (!ps_open_file($ps, "pattern.ps")) { print "Cannot open PostScript file "; exit; } ps_set_parameter($ps, "warning", "true"); ps_set_info($ps, "Creator", "pattern.php"); ps_set_info($ps, "Author", "Uwe Steinmann"); ps_set_info($ps, "Title", "Pattern example"); $pspattern = ps_begin_pattern($ps, 10.0, 10.0, 10.0, 10.0, 1); ps_setlinewidth($ps, 0.2); ps_setcolor($ps, "stroke", "rgb", 0.0, 0.0, 1.0, 0.0); ps_moveto($ps, 0, 0); ps_lineto($ps, 7, 7); ps_stroke($ps); ps_moveto($ps, 0, 7); ps_lineto($ps, 7, 0); ps_stroke($ps); ps_end_pattern($ps); ps_begin_page($ps, 596, 842); ps_setcolor($ps, "both", "pattern", $pspattern, 0.0, 0.0, 0.0); ps_rect($ps, 50, 400, 200, 200); ps_fill($ps); ps_end_page($ps); ps_close($ps); ps_delete($ps); ?> SEE ALSO
ps_end_pattern(3), ps_setcolor(3), ps_shading_pattern(3). PHP Documentation Group PS_BEGIN_PATTERN(3)
Man Page

8 More Discussions You Might Find Interesting

1. IP Networking

The "right" Way to Configure Reverse Zones?

I'm not sure where this really fits in the Unix.com forums, but this seemed to be a good spot for it. If not, please let me know: I've been trying to track down an issue that I've had for quite a while with reverse lookups. I've got a primary and secondary DNS that are authoritative for some... (8 Replies)
Discussion started by: deckard
8 Replies

2. UNIX for Dummies Questions & Answers

Conditionally joining lines in vi

I've done this before but I can't remember how. Too long away from vi. I want to do a search are replace, but I want the replace to be a join. Example see spot run see spot walk see spot run fast see spot hop %s/run$/<somehow perform a join with the next line>/g so the results... (0 Replies)
Discussion started by: ifermon
0 Replies

3. Shell Programming and Scripting

How do I search with regex in one spot?

Hello im new here and i shot stright with question. Mainly i wanna ask , how do i search with regexp in one spot and show the whole thing, what im trying to ask is , for eg. i do ls -l, and i see all the info for the dirs and dats. now say i wanna get all the dats that in their name they start... (2 Replies)
Discussion started by: Goroner
2 Replies

4. Emergency UNIX and Linux Support

[Solved] /var is filling continuously

Hi All, I have Solaris-10 machine. Yesterday I patched it with Solaris-10 patch Cluster. Since then glance software is filling up /var/core continuously. In every few minutes, it will fill /var to 100%. Glance runs through /etc/init.d/mwa and I already stopped it, still core files are... (15 Replies)
Discussion started by: solaris_1977
15 Replies

5. Programming

passing float parameter

I am surprised by GCC (this is ver. 4.2.4, Ubuntu 32 bit Intel) when a function declares a float parameter and it's prototype is missing, the parameters are messed up. Please see my code below: ~/test$ cat x1.c #include <stdio.h> #include <stdlib.h> set_p(int p1, float p2, int p3, int p4)... (7 Replies)
Discussion started by: migurus
7 Replies

6. AIX

Unable to Create spot from mksysb

Hello All, Kindly need help in my problem i.e. I get this error when i create spot from mksysb. #0042-001 nim: processing error encountered on "master": 0042-001 m_mkspot: processing error encountered on "master": 0042-175 c_mkspot: An unexpected result was returned by the... (2 Replies)
Discussion started by: emerann
2 Replies

7. UNIX for Dummies Questions & Answers

Can anyone help me to spot my mistake?

Hi there can anyone help me to spot my mistake and please explain why it appears My code : #!/usr/bin/gawk -f BEGIN { bytes =0} { temp=$(grep "datafeed\.php" | cut -d" " -f8) bytes += temp} END { printf "Number of bytes: %d\n", bytes } when I am running ./q411 an411 an411: ... (6 Replies)
Discussion started by: FUTURE_EINSTEIN
6 Replies

8. Shell Programming and Scripting

Perl script to fill the entire row of Excel file with color based on pattern match

Hi All , I have to write one Perl script in which I need to read one pre-existing xls and based on pattern match for one word in some cells of the XLS , I need to fill the entire row with one color of that matched cell and write the content to another excel Please find the below stated... (2 Replies)
Discussion started by: kshitij
2 Replies