PDF::API2::Content

Subclassed from PDF::API2::PDF::Dict.

        $co = PDF::API2::Content->new @parameters                 

Returns a new content object (called from $page->text/gfx).

        $co->add @content                 

Adds @content to the object.

        $co->save                 

Saves the state of the object.

        $co->restore                 

Restores the state of the object.

        $co->compress                 

Marks content for compression on output.

        $co->fillcolor $grey                          $co->fillcolor $api2colorobject                          $co->fillcolor $red, $green, $blue                          $co->fillcolor $cyan, $magenta, $yellow, $black                          $co->fillcolorbyname $colorname, $ascmyk                          $co->fillcolorbyspace $colorspace, @colordef                 

Sets fillcolor.

        $co->strokecolor $grey                          $co->strokecolor $api2colorobject                          $co->strokecolor $red, $green, $blue                          $co->strokecolor $cyan, $magenta, $yellow, $black                          $co->strokecolorbyname $colorname, $ascmyk                          $co->strokecolorbyspace $colorspace, @colordef                 

Sets strokecolor.

Defined color-names are:


	aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, 
	blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, 
	cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkgrey, 
	darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, 
	darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, 
	deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, 
	fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, 
	hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon,
	lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightgrey, 
	lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, 
	lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine,
	mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, 
	mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, 
	navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen,
	paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, 
	red, rosybrown, royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, 
	silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal,
	thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen

or the rgb-hex-notation:


	#rgb, #rrggbb, #rrrgggbbb and #rrrrggggbbbb

or the cmyk-hex-notation:


	%cmyk, %ccmmyykk, %cccmmmyyykkk and %ccccmmmmyyyykkkk

or the hsl-hex-notation:


	&hsl, &hhssll, &hhhssslll and &hhhhssssllll

and additionally the hsv-hex-notation:


	!hsv, !hhssvv, !hhhsssvvv and !hhhhssssvvvv

        $co->flatness $flat                 

Sets flatness.

        $co->linecap $cap                 

Sets linecap.

        $co->linedash @dash                 

Sets linedash.

        $co->linejoin $join                 

Sets linejoin.

        $co->linewidth $width                 

Sets linewidth.

        $co->meterlimit $limit                 

Sets meterlimit.

        $co->matrix $a,$b,$c,$d,$e,$f                 

Sets matrix transformation.

        $co->translate $x,$y                 

Sets translation transformation.

        $co->scale $sx,$sy                 

Sets scaleing transformation.

        $co->skew $sa,$sb                 

Sets skew transformation.

        $co->rotate $rot                 

Sets rotation transformation.

        $co->transform %opts                 

Sets transformations (eg. translate, rotate, scale, skew) in pdf-canonical order.

Example:


	$co->transform(
		-translate => [$x,$y],
		-rotate    => $rot,
		-scale     => [$sx,$sy],
		-skew      => [$sa,$sb],
	)

        $co->resource $type, $key, $obj                 

Adds a resource to the page-inheritance tree.

Example:


	$co->resource('Font',$fontkey,$fontobj);
	$co->resource('XObject',$imagekey,$imageobj);
	$co->resource('Shading',$shadekey,$shadeobj);
	$co->resource('ColorSpace',$spacekey,$speceobj);

Note: You only have to add the required resources, if they are NOT handled by the *font*, *image*, *shade* or *space* methods.

AUTHOR

alfred reibenschuh