Lasso Soft Inc. > Home

[PDF_Doc->SetColor]

[PDF_Doc->SetColor] sets the color and style for subsequent drawing operations. A required 'type' parameter specifies whether the drawing action is of type Stroke, Fill, or Both.

The color can be specified as a [PDF_Color] object or as a series of parameters.

If parameters are used then a 'color' parameter specifies a color type of Gray, RGB, or CMYK. If Gray is specified, a decimal value specifies a gray color value. If RGB is specified, three decimal values specifiy red, green and blue values, respectively. If CMYK is specified, four decimal values specifiy cyan, magenta, yellow, and black values, respectively. Color values are specified as decimals ranging from 0 to 1.0.

Note - The color (and line width) must be set before drawing occurs on each new page of the PDF.

  • Syntax
  • Parameters
[$PDF_Doc->(SetColor: 'stroke', (PDF_Color: 'rgb', 1.0, 0.5, 0.0))]
[$PDF_Doc->(SetColor: 'fill', (PDF_Color: 'cmyk', 1.0, 0.5, 0.0, 0.5))]

[$PDF_Doc->(SetColor: 'stroke', 'Gray', Decimal)]
[$PDF_Doc->(SetColor: 'stroke', 'RGB', Decimal, Decimal, Decimalr)]
[$PDF_Doc->(SetColor: 'stroke', 'CMYK', Decimal, Decimal, Decimal, Decimal)]
Required Parameters
Type Specifies the drawing action as Stroke, Fill, or Both.
Color Specifies a [PDF_Color] object or a string type of Gray, RGB, or CMYK.
Decimal(s) Specify color values of 0 to 1.0 for the selected color parameter.
Examples

See the PDF chapter in the Lasso 8 Language Guide for examples of how to use this tag. Many of the PDF examples require lengthy descriptions and the use of several related tags and are better suited to presentation in the Language Guide. This tag is documented on page 589.

Tag Link [PDF_Doc->SetColor] Category PDF
Type Member Data Source Any
Support Preferred Version 6.0
Output Type None Security File
Implementation LJAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft