Documentation

EllipticArc
in package
implements OperationInterface

Interfaces, Classes, Traits and Enums

OperationInterface

Table of Contents

ZERO_TOLERANCE  = 1.0E-5
$largeArc  : bool
$sweep  : bool
$x  : float
$xAxisAngle  : float
$xRadius  : float
$y  : float
$yRadius  : float
__construct()  : mixed
getX()  : float
getXAxisAngle()  : float
getXRadius()  : float
getY()  : float
getYRadius()  : float
isLargeArc()  : bool
isSweep()  : bool
toCurves()  : array<string|int, \BaconQrCode\Renderer\Path\Curve|\BaconQrCode\Renderer\Path\Line>
Converts the elliptic arc to multiple curves.
translate()  : self
Translates the operation's coordinates.
angle()  : float
calculateCenterPointParameters()  : array<string|int, float>
createCurves()  : array<string|int, Curve>
derivative()  : array<string|int, float>
point()  : array<string|int, float>

Constants

Properties

Methods

__construct()

public __construct(float $xRadius, float $yRadius, float $xAxisAngle, bool $largeArc, bool $sweep, float $x, float $y) : mixed
Parameters
$xRadius : float
$yRadius : float
$xAxisAngle : float
$largeArc : bool
$sweep : bool
$x : float
$y : float
Return values
mixed

getX()

public getX() : float
Return values
float

getXAxisAngle()

public getXAxisAngle() : float
Return values
float

getXRadius()

public getXRadius() : float
Return values
float

getY()

public getY() : float
Return values
float

getYRadius()

public getYRadius() : float
Return values
float

isLargeArc()

public isLargeArc() : bool
Return values
bool

isSweep()

public isSweep() : bool
Return values
bool

toCurves()

Converts the elliptic arc to multiple curves.

public toCurves(float $fromX, float $fromY) : array<string|int, \BaconQrCode\Renderer\Path\Curve|\BaconQrCode\Renderer\Path\Line>

Since not all image back ends support elliptic arcs, this method allows to convert the arc into multiple curves resembling the same result.

Parameters
$fromX : float
$fromY : float
Tags
see
https://mortoray.com/2017/02/16/rendering-an-svg-elliptical-arc-as-bezier-curves/
Return values
array<string|int, \BaconQrCode\Renderer\Path\Curve|\BaconQrCode\Renderer\Path\Line>

translate()

Translates the operation's coordinates.

public translate(float $x, float $y) : self
Parameters
$x : float
$y : float
Return values
self

angle()

private static angle(float $ux, float $uy, float $vx, float $vy) : float
Parameters
$ux : float
$uy : float
$vx : float
$vy : float
Return values
float

calculateCenterPointParameters()

private calculateCenterPointParameters(float $fromX, float $fromY, float $xAngle) : array<string|int, float>
Parameters
$fromX : float
$fromY : float
$xAngle : float
Return values
array<string|int, float>

createCurves()

private createCurves(float $fromX, mixed $fromY) : array<string|int, Curve>
Parameters
$fromX : float
$fromY : mixed
Return values
array<string|int, Curve>

derivative()

private static derivative(float $radiusX, float $radiusY, float $xAngle, float $angle) : array<string|int, float>
Parameters
$radiusX : float
$radiusY : float
$xAngle : float
$angle : float
Return values
array<string|int, float>

point()

private static point(float $centerX, float $centerY, float $radiusX, float $radiusY, float $xAngle, float $angle) : array<string|int, float>
Parameters
$centerX : float
$centerY : float
$radiusX : float
$radiusY : float
$xAngle : float
$angle : float
Return values
array<string|int, float>

Search results