Change language

PHP ImagickDraw function setStrokeLineJoin ()

|
Syntax:
bool ImagickDraw::setStrokeLineJoin ($linejoin)
Parameters: This function takes one parameter, $linejoin, which is used to store the string concatenation value as an integer type.LINEJOIN constants:
  • imagick::LINEJOIN_UNDEFINED (integer)
  • imagick::LINEJOIN_MITER (integer)
  • imagick::LINEJOIN_ROUND (integer)
  • imagick::LINEJOIN_BEVEL (integer)
Returned value:This function does not return any value.The following programs illustrate the ImagickDraw function::setStrokeLineJoin()in PHP:Program 1:  
// require_once (& # 39; path / vendor / autoload.php ’); 
// Create an ImagickDraw object for drawing. $draw = new ImagickDraw();  
// Set the opacity of the stroke $draw -> setStrokeOpacity (1);  
// Set stroke color $draw -> setStrokeColor ( ’Black’ );  
// Set the opacity of the stroke $draw -> setStrokeOpacity (0.8);  
// Set the stroke width $draw -> setStrokeWidth (10);  
// Set stroke line parameters $draw -> setStrokeLineJoin (Imagick::LINEJOIN_ROUND);  
// Set the fill color of the image $draw -> setFillColor ( ’lightgreen’ );  
// Set the miter travel limit $draw -> setStrokeMiterLimit (40 * 12); $points = [ [ ’x’ = > 50 * 6, ’y’ = > 10 * 5], [ ’x’ = > 20 * 7, ’y’ = > 30 * 5], [ ’x’ = > 60 * 8, ’y’ = > 50 * 5], [ ’x’ = > 70 * 3, ’y’ = > 15 * 5], ];  
// Draw a polygon $draw -> polygon ( $points );  
// Create a new Imagick object $image = new Imagick();  
// Set image size $image -> newImage (500, 300, ’white’ );  
// Set image format $image -> setImageFormat ( "png" );  
// Draw image $image -> drawImage ( $draw ); header ( "Content-Type: image / png" );  
// Show image echo $image -> getImageBlob(); ?>
Output: Program 2:  
// Create ImagickDraw object $draw = new ImagickDraw();  
// Set the stroke width $draw -> setStrokeWidth (1);  
// Set the stroke color $draw -> setStrokeColor ( ’black’ );  
// Set the fill color of the image $draw -> setFillColor ( ’yellow’ );  
// Set the stroke width $draw -> setStrokeWidth (20);  
// Decalare offset variable $offset = 220; $lineJoinStyle = [ Imagick::LINEJOIN_MITER, Imagick::LINEJOIN_ROUND, Imagick::LINEJOIN_BEVEL, ]; for ( $x = 0; $x < count ( $lineJoinStyle ); $x ++) { $draw -> setStrokeLineJoin ( $lineJoinStyle [ $x ]) ; $points = [ [ ’x’ = > 40 * 5, ’y’ = > 10 * 5 + $x * $offset ], [ ’x’ = > 20 * 5, ’y’ = > 20 * 5 + $x * $offset ], [ ’x’ = > 70 * 5, ’y’ = > 50 * 5 + $x * $offset ], [ ’x’ = > 40 * 5, ’y’ = > 10 * 5 + $x * $offset ], ];  
// Draw a polygon $draw -> polyline ( $points ); }  
// Create a new Imagick object $image = new Imagick();  
// Set image dimensions $image -> newImage (500, 700, ’white’ );  
// Set image format $image -> setImageFormat ( "png" );  
// Draw image $image -> drawImage ( $draw ); header ( "Content-Type: image / png" );  
// Show image echo $image -> getImageBlob(); ?>
Output: Link: http://php.net/manual/en/imagickdraw.setstrokelinejoin.php

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

Common xlabel/ylabel for matplotlib subplots

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Why do I get "Pickle - EOFError: Ran out of input" reading an empty file?

12 answers

NUMPYNUMPY

Flake8: Ignore specific warning for entire file

12 answers

NUMPYNUMPY

glob exclude pattern

12 answers

NUMPYNUMPY

How to avoid HTTP error 429 (Too Many Requests) python

12 answers

NUMPYNUMPY

Python CSV error: line contains NULL byte

12 answers

NUMPYNUMPY

csv.Error: iterator should return strings, not bytes

12 answers


Wiki

Python | How to copy data from one Excel sheet to another

Common xlabel/ylabel for matplotlib subplots

Check if one list is a subset of another in Python

sin

How to specify multiple return types using type-hints

exp

Printing words vertically in Python

exp

Python Extract words from a given string

Cyclic redundancy check in Python

Finding mean, median, mode in Python without libraries

cos

Python add suffix / add prefix to strings in a list

Why do I get "Pickle - EOFError: Ran out of input" reading an empty file?

Python - Move item to the end of the list

Python - Print list vertically