public void Apply (GraphicsHandler graphics) { graphics.Control.SetFillColorSpace (patternColorSpace); // make current transform apply to the pattern var currentTransform = graphics.Control.GetCTM(); if (graphics.DisplayView != null) { var pos = graphics.DisplayView.ConvertPointToView (sd.PointF.Empty, null); currentTransform.Translate(pos.X, pos.Y); graphics.Control.SetPatternPhase(new sd.SizeF(-pos.X, -pos.Y)); } if (pattern == null || viewTransform != currentTransform) { viewTransform = currentTransform; SetPattern (); } graphics.Control.SetFillPattern (pattern, alpha); }
public void Apply(GraphicsHandler graphics) { graphics.Control.SetFillColorSpace(patternColorSpace); // make current transform apply to the pattern var currentTransform = graphics.Control.GetCTM(); if (graphics.DisplayView != null) { var pos = graphics.DisplayView.ConvertPointToView(sd.PointF.Empty, null); currentTransform.Translate(pos.X, pos.Y); graphics.Control.SetPatternPhase(new sd.SizeF(-pos.X, -pos.Y)); } if (pattern == null || viewTransform != currentTransform) { viewTransform = currentTransform; SetPattern(); } graphics.Control.SetFillPattern(pattern, alpha); }
static void Clean() { if (transform != null) { target.ConcatCTM (transform.Value.Invert ()); transform = null; } }
static void Translate(float dx, float dy) { target.TranslateCTM (dx, dy); transform = target.GetCTM (); }
static void SetMatrix(float v11, float v12, float v21, float v22, float v31, float v32) { transform = new CGAffineTransform (v11, v12, v21, v22, v31, v32); target.ConcatCTM (transform.Value); }