Commit Graph
20 Commits
Author SHA1 Message Date
Antoine Mercadal 29c336f7b8 Fixed: Wrong initial values for _lineDashesPhase and _lineDashes in CPBezierPath
Firefox is not accepting the initial values for these two attributes, making it crash with an ILLEGAL VALUE error in any application using CPBezierPath (especially ones with CPPredicateEditor that is using bezier path to draw the selection arrows.)
2013-06-12 13:21:46 -07:00
Alexandre Wilhelm 5e0793c2ac Fixed small init bug in CPBezierPath 2013-05-20 19:06:48 -07:00
Alexander Ljungberg 31c06771f3 Fixed: CPBezierPath getLineDash:phase: typo. 2013-03-21 14:37:37 +00:00
Alexander Ljungberg da9333e884 Fixed: CPBezierPath getLineDash: nil arguments, setLineDash:count:phase: argument style.
Previously, passing nil to the first or last argument of getLineDash:count:phase: would cause a crash.

With this change, these references are simply not written to if nil.

Previously, setLineDash:count:phase: took references for its arguments to match getLineDash:count:phase:. This was however wrong and is not what is done in Cocoa.

This fix makes the setLineDash:count:phase: calling convention the same as in Cocoa.
2013-03-20 16:02:27 +00:00
Alexander Ljungberg ffbd9815d5 New: CPBezierPath setLineDash: and getLineDash:.
Also includes Cocoa compatible methods for completeness.
2013-03-20 15:26:51 +00:00
Aparajita Fishman a011596231 CGContext fixes/enhancements
- NEW: Retrieve the underlying Image element from a CPImage with -image.
- NEW: You can now render any arbitrary drawing to a pattern context and use that as a fill or stroke pattern. See CGContextCreatePatternContext, CGContextSetFillPattern and CGContextSetStrokePattern. Works in all canvas-enabled browsers, including IE 9+.
- NEW: An example of using a custom rendered pattern is in Tests/Manual/PatternFillTest.
- NEW: Test if a CPImage is a single image (vs. three/nine part) with -isSingleImage.
- FIXED: With canvas, we have to track ourselves whether the context has a path or not.
- FIXED: All shapes except rects may not be added to a path with no context. If you attempt to do so, an error is logged.
- FIXED: CGPath was not setting the start and current point correctly in some cases.
- FIXED: CGContextAddPath was not moving to the path's start point at the beginning.
- FIXED: Removed superfluous CGContextClosePath commands, fixed some drawing sequences.
- FIXED: Misc. formatting.

Sorry, these changes are canvas only (including IE 9+)! I am not going to spend the time to port these fixes to VML (IE 8).
2013-02-23 13:53:20 -05:00
Alexander Ljungberg e03622be9c + CPBezierPath bezierPathWithRoundedRect:xRadius:yRadius:. 2013-02-18 18:18:28 +00:00
Alexander Ljungberg 391701fdc7 - CPBezierPath addClip and setClip.
This enables e.g. a `CPGradient` to be drawn clipped by an arbitrary bezier path.
2012-10-22 15:02:28 +01:00
Alexander Ljungberg eba3e95b81 CPBezierPath controlPointBounds and CGPathGetBoundingBox. 2012-10-15 11:10:23 +01:00
Alexander Ljungberg ca4e034a3b CPBezierPath appendBezierPathWithArcFromPoint:toPoint:radius: and CGPathAddArcToPoint. 2012-10-15 02:47:37 +01:00
Alexander Ljungberg 9acbe0f2f8 Fix incorrect parameter type. 2012-03-09 19:49:58 +00:00
Stephen Ierodiaconou 6a942630e4 Fixing spelling mistakes 2011-01-24 11:05:48 +02:00
Stephen Ierodiaconou b46d283dc4 Closes 702: CPBezierPath stroke calls CGContextClosePath 2010-12-01 09:45:46 +02:00
Francisco Ryan Tolmasky I 52f7844aee Made it so .h files are automatically included in AppKit (avoiding needing to manually include Platform.h, etc.).
Also changed a bunch of <AppKit/*> imports to "*" imports.

Reviewed by me.
2010-11-01 11:10:01 -07:00
Alexander Ljungberg db8e132ef2 Whitespace and style fixes. 2010-10-09 22:07:57 -04:00
lowell vizonandFrancisco Ryan Tolmasky I 1a5bf1c8eb CPBezierPath documentation completed.
Signed-off-by: Francisco Ryan Tolmasky I <francisco@280north.com>
2009-08-08 03:50:52 +08:00
Francisco Ryan Tolmasky I 7e88b1abfd Minor stylistic changes.
Reviewed by me.
2009-06-09 17:54:18 -07:00
Ross Boucher 850125b8ab Add documentation groups 2009-05-18 15:43:36 -07:00
Ross Boucher cfed10bbac Add bezier path to appkit.j, fix slight code bug 2009-05-16 16:18:26 -07:00
Ross Boucher 9c7f07979b Add CPBezierPath, clean up some of CGPath and CGContext 2009-05-14 19:06:58 -07:00