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);
			}
示例#2
0
            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);
            }
示例#3
0
 static void Clean()
 {
     if (transform != null) {
         target.ConcatCTM (transform.Value.Invert ());
         transform = null;
     }
 }
示例#4
0
 static void Translate(float dx, float dy)
 {
     target.TranslateCTM (dx, dy);
     transform = target.GetCTM ();
 }
示例#5
0
 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);
 }