class SpillCommand extends AbstractCommand implements CommandInterface

기준 사이즈에서 짧을 길이에 맞춰서 리사이징 command

Properties

protected Dimension $dimension Dimension interface from AbstractCommand
protected Dimension $originDimension Origin dimension from AbstractCommand

Methods

void
setDimension(Dimension $dimension)

Set a dimension

void
setOriginDimension(Dimension $dimension)

Set origin dimension

getDimension()

Get a dimension

getOriginDimension()

Get a dimension

string
getName()

Specific command name

string
getMethod()

Executed command method name

array
getExecArgs()

Arguments of executed method

array
remakeDimensionAsRatio(int $srcWidth, int $srcHeight, int $dstWidth, int $dstHeight)

get new dimension by keeping the ratio

Details

in AbstractCommand at line 51
void setDimension(Dimension $dimension)

Set a dimension

Parameters

Dimension $dimension Dimension interface

Return Value

void

in AbstractCommand at line 62
void setOriginDimension(Dimension $dimension)

Set origin dimension

Parameters

Dimension $dimension dimension instance

Return Value

void

in AbstractCommand at line 72
Dimension getDimension()

Get a dimension

Return Value

Dimension

in AbstractCommand at line 82
Dimension getOriginDimension()

Get a dimension

Return Value

Dimension

at line 36
string getName()

Specific command name

Return Value

string

at line 46
string getMethod()

Executed command method name

Return Value

string

at line 56
array getExecArgs()

Arguments of executed method

Return Value

array

at line 75
private array remakeDimensionAsRatio(int $srcWidth, int $srcHeight, int $dstWidth, int $dstHeight)

get new dimension by keeping the ratio

Parameters

int $srcWidth original width
int $srcHeight original height
int $dstWidth be resize width
int $dstHeight be resize height

Return Value

array