TCPDF::CoonsPatchMesh( $x,  $y,  $w,  $h,  $col1 = array(),  $col2 = array(),  $col3 = array(),  $col4 = array(),  $coords = array(0.0, 0.0, 0.33, 0.0, 0.67, 0.0, 1.0, 0.0, 1.0, 0.33, 1.0, 0.67, 1.0, 1.0, 0.67, 1.0, 0.33, 1.0, 0.0, 1.0, 0.0, 0.67, 0.0, 0.33),  $coords_min,  $coords_max = 1,  $antialias = false )

Paints a coons patch mesh.


Description Description


Parameters Parameters

$x

(Required) (float) abscissa of the top left corner of the rectangle.

$y

(Required) (float) ordinate of the top left corner of the rectangle.

$w

(Required) (float) width of the rectangle.

$h

(Required) (float) height of the rectangle.

$col1

(Optional) (array) first color (lower left corner) (RGB components).

Default value: array()

$col2

(Optional) (array) second color (lower right corner) (RGB components).

Default value: array()

$col3

(Optional) (array) third color (upper right corner) (RGB components).

Default value: array()

$col4

(Optional) (array) fourth color (upper left corner) (RGB components).

Default value: array()

$coords

(Optional) (array) <ul><li>for one patch mesh: array(float x1, float y1, .... float x12, float y12): 12 pairs of coordinates (normally from 0 to 1) which specify the Bezier control points that define the patch. First pair is the lower left edge point, next is its right control point (control point 2). Then the other points are defined in the order: control point 1, edge point, control point 2 going counter-clockwise around the patch. Last (x12, y12) is the first edge point's left control point (control point 1).</li><li>for two or more patch meshes: array[number of patches]: arrays with the following keys for each patch: f: where to put that patch (0 = first patch, 1, 2, 3 = right, top and left of precedent patch - I didn't figure this out completely - just try and error ;-) points: 12 pairs of coordinates of the Bezier control points as above for the first patch, 8 pairs of coordinates for the following patches, ignoring the coordinates already defined by the precedent patch (I also didn't figure out the order of these - also: try and see what's happening) colors: must be 4 colors for the first patch, 2 colors for the following patches</li></ul>

Default value: array(0.0, 0.0, 0.33, 0.0, 0.67, 0.0, 1.0, 0.0, 1.0, 0.33, 1.0, 0.67, 1.0, 1.0, 0.67, 1.0, 0.33, 1.0, 0.0, 1.0, 0.0, 0.67, 0.0, 0.33)

$coords_min

(Required) (array) minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0

$coords_max

(Optional) (array) maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1

Default value: 1

$antialias

(Optional) (boolean) A flag indicating whether to filter the shading function to prevent aliasing artifacts.

Default value: false


Top ↑

Source Source

File: includes/lib/tcpdf/tcpdf.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
3.1.000 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.