exSprite.CalculateVertex C# (CSharp) Method

CalculateVertex() public method

public CalculateVertex ( float &_x, float &_y, float _widthScaled, float _heightScaled, float _col, float _row, float _offsetX, float _offsetY ) : void
_x float
_y float
_widthScaled float
_heightScaled float
_col float
_row float
_offsetX float
_offsetY float
return void
    void CalculateVertex( out float _x, out float _y, 
                           float _widthScaled,
                           float _heightScaled,
                           float _col,
                           float _row,
                           float _offsetX, 
                           float _offsetY )
    {
        // calculate the base pos
        _x = _widthScaled * (_col - 0.5f);
        _y =  _heightScaled * (0.5f - _row);

        // calculate the pos affect by anchor
        _x -= _offsetX;
        _y += _offsetY;

        // calculate the shear
        float old_x = _x;
        _x += _y * shear_.x;
        _y += old_x * shear_.y;
    }