js-util

Home > rc-js-util > Margin2d

Margin2d class

2x2 matrix representing margins on a rectangle.

Signature:

export declare abstract class Margin2d<TArray extends TTypedArray> extends Mat2<TArray> 

Extends: Mat2

Remarks

See static properties for constructors. Instances are not an extension of this class, but of the static members.

Properties

Property Modifiers Type Description
“0”   number left
“1”   number right
“2”   number top
“3”   number bottom
constructor   IMargin2dCtor<TArray>  
constructors static Map<TTypedArrayCtor, Function>  
f32 static IMargin2dCtor<Float32Array>  
f64 static IMargin2dCtor<Float64Array>  
i16 static IMargin2dCtor<Int16Array>  
i32 static IMargin2dCtor<Int32Array>  
i8 static IMargin2dCtor<Int8Array>  
TTypeGuardAMargin2d   true  
u16 static IMargin2dCtor<Uint16Array>  
u32 static IMargin2dCtor<Uint32Array>  
u8 static IMargin2dCtor<Uint8Array>  
u8c static IMargin2dCtor<Uint8ClampedArray>  

Methods

Method Modifiers Description
castToBaseType()   Although the typed array tuples extend a typed array, they are not structurally compatible. This function returns the argument passed without modification but cast as the underlying storage type, e.g. Float32Array.
copyFromBuffer(_memoryDataView, _pointer, _littleEndian)   If endianness is not supplied the platform’s endianness will be used.
copyToBuffer(_memoryDataView, _pointer, _littleEndian)   If endianness is not supplied the platform’s endianness will be used.
getBottom()    
getCtor(ctor) static  
getInnerRange(_range, _result)    
getLeft()    
getRight()    
getTop()    
mat3TransformLength(_mat, _writeTo)   Applies Mat3.getTransformedXLength Mat3.getTransformedYLength with a minimum of 0 and a maximum of whatever the margin is.
setBottom(_value)    
setLeft(_value)    
setRight(_value)    
setTop(_value)    
sumX()    
sumY()    
update(_args)