SetPatternPhase() public method

public SetPatternPhase ( SizeF phase ) : void
phase System.Drawing.SizeF
return void
Esempio n. 1
0
        static void SetupContextForDrawing(CGContext ctx)
        {
            if (ctx.IsPathEmpty ())
                return;

            // setup pattern drawing to better match the behavior of Cairo
            var drawPoint = ctx.GetCTM ().TransformPoint (ctx.GetPathBoundingBox ().Location);
            var patternPhase = new SizeF (drawPoint.X, drawPoint.Y);
            if (patternPhase != SizeF.Empty)
                ctx.SetPatternPhase (patternPhase);
        }