public void AddShadowCaster(Transform2D mat, ShadowCaster caster, float tx, float ty) { AddShadowCaster(mat, caster.Vertices, tx, ty, caster.ShadowType); }
public void SetMatrix(Transform2D _trans) { _transform = _trans; }
/// <summary> /// Pops the drawing matrix off the internal matrix stack. /// </summary> public void PopMatrix() { _transform = _matrixStack.Pop(); }
public unsafe void TransformPixelPerfect(float x0, float y0, float u0, float v0, Transform2D t, Color color) { if (t._tFormed) { Position.X = (int)(0.5f + x0 * t._ix + y0 * t._jx + t._tx); Position.Y = (int)(0.5f + x0 * t._iy + y0 * t._jy + t._ty); } else { Position.X = x0; Position.Y = y0; } Tex0.X = u0; Tex0.Y = v0; Tex1.X = t._tanX; Tex1.Y = t._tanY; Color = color; }
public unsafe void Transform(float x0, float y0, float u0, float v0, float u1, float v1, Transform2D t, Color color) { if (t._tFormed) { Position.X = x0 * t._ix + y0 * t._jx + t._tx; Position.Y = x0 * t._iy + y0 * t._jy + t._ty; } else { Position.X = x0; Position.Y = y0; } Tex0.X = u0; Tex0.Y = v0; Tex1.X = u1; Tex1.Y = v1; Color = color; }
public unsafe void Transform(Vector2 p, Transform2D t) { Position.X = p.X * t._ix + p.Y * t._jx + t._tx; Position.Y = p.X * t._iy + p.Y * t._jy + t._ty; }