Updated Example

This commit is contained in:
Curtis Hard
2018-03-02 14:12:57 +00:00
parent 35f8663631
commit 1b3cf5a1a0
4 changed files with 4 additions and 40 deletions
@@ -678,31 +678,9 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<customView misplaced="YES" id="hhC-1S-CCX" customClass="SVGView">
<rect key="frame" x="0.0" y="0.0" width="600" height="385"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="479"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</customView>
<button verticalHuggingPriority="750" misplaced="YES" id="gpW-KV-dZb">
<rect key="frame" x="14" y="431" width="205" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Render with CoreAnimation" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="b5N-FF-ykt">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="switchToCoreAnimation:" target="hhC-1S-CCX" id="318-qP-1z4"/>
</connections>
</button>
<button verticalHuggingPriority="750" misplaced="YES" id="68n-xB-I0F">
<rect key="frame" x="14" y="398" width="205" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Render with CoreGraphics" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Tcq-b5-8Y0">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="switchToCoreGraphics:" target="hhC-1S-CCX" id="gzP-YM-P2p"/>
</connections>
</button>
</subviews>
</view>
<point key="canvasLocation" x="98" y="496.5"/>
+1 -3
View File
@@ -11,11 +11,9 @@
@interface SVGView : NSView {
@private
IJSVG * svg;
}
- (IBAction)switchToCoreGraphics:(id)sender;
- (IBAction)switchToCoreAnimation:(id)sender;
@end
+1 -13
View File
@@ -29,21 +29,9 @@
return self;
}
- (void)switchToCoreGraphics:(id)sender
{
svg.renderingEngine = IJSVGRenderingEngineQuartz;
[self setNeedsDisplay:YES];
}
- (void)switchToCoreAnimation:(id)sender
{
svg.renderingEngine = IJSVGRenderingEngineLayered;
[self setNeedsDisplay:YES];
}
- (IJSVG *)svg
{
return [IJSVG svgNamed:@"clipped"];
return [IJSVG svgNamed:@"intertwingly"];
}
- (void)drawRect:(NSRect)dirtyRect