Various speed improvements and fixes
Example now shows all examples in one window
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6206.9" systemVersion="14A343f" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6206.9" systemVersion="14A343f" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment defaultVersion="1070" identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6206.9"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -669,12 +670,31 @@
|
||||
<window title="IJSVGExample" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="335" y="390" width="480" height="360"/>
|
||||
<rect key="contentRect" x="335" y="390" width="631" height="462"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
|
||||
<view key="contentView" id="EiT-Mj-1SZ" customClass="SVGView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="360"/>
|
||||
<view key="contentView" id="EiT-Mj-1SZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="631" height="462"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<customView id="hhC-1S-CCX" customClass="SVGView">
|
||||
<rect key="frame" x="0.0" y="237" width="183" height="225"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
</customView>
|
||||
<customView id="jOS-l1-voG" customClass="SVGExampleView2">
|
||||
<rect key="frame" x="448" y="237" width="183" height="225"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES"/>
|
||||
</customView>
|
||||
<customView id="mxr-zw-MsV" customClass="SVGExampleView1">
|
||||
<rect key="frame" x="182" y="237" width="267" height="225"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
</customView>
|
||||
<customView id="bHV-ou-brV" customClass="SVGExampleView3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="631" height="238"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
</customView>
|
||||
</subviews>
|
||||
</view>
|
||||
<point key="canvasLocation" x="587.5" y="387"/>
|
||||
</window>
|
||||
</objects>
|
||||
</document>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// SVGExampleView1.h
|
||||
// IJSVGExample
|
||||
//
|
||||
// Created by Curtis Hard on 04/09/2014.
|
||||
// Copyright (c) 2014 Curtis Hard. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "SVGView.h"
|
||||
|
||||
@interface SVGExampleView1 : SVGView
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// SVGExampleView1.m
|
||||
// IJSVGExample
|
||||
//
|
||||
// Created by Curtis Hard on 04/09/2014.
|
||||
// Copyright (c) 2014 Curtis Hard. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SVGExampleView1.h"
|
||||
|
||||
@implementation SVGExampleView1
|
||||
|
||||
- (IJSVG *)svg
|
||||
{
|
||||
return [[IJSVG svgNamed:@"paperplane"] retain];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// SVGExampleView2.h
|
||||
// IJSVGExample
|
||||
//
|
||||
// Created by Curtis Hard on 04/09/2014.
|
||||
// Copyright (c) 2014 Curtis Hard. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "SVGView.h"
|
||||
|
||||
@interface SVGExampleView2 : SVGView
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// SVGExampleView2.m
|
||||
// IJSVGExample
|
||||
//
|
||||
// Created by Curtis Hard on 04/09/2014.
|
||||
// Copyright (c) 2014 Curtis Hard. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SVGExampleView2.h"
|
||||
|
||||
@implementation SVGExampleView2
|
||||
|
||||
- (IJSVG *)svg
|
||||
{
|
||||
return [[IJSVG svgNamed:@"htc_one"] retain];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// SVGExampleView3.h
|
||||
// IJSVGExample
|
||||
//
|
||||
// Created by Curtis Hard on 04/09/2014.
|
||||
// Copyright (c) 2014 Curtis Hard. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "SVGView.h"
|
||||
|
||||
@interface SVGExampleView3 : SVGView
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// SVGExampleView3.m
|
||||
// IJSVGExample
|
||||
//
|
||||
// Created by Curtis Hard on 04/09/2014.
|
||||
// Copyright (c) 2014 Curtis Hard. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SVGExampleView3.h"
|
||||
|
||||
@implementation SVGExampleView3
|
||||
|
||||
- (IJSVG *)svg
|
||||
{
|
||||
return [[IJSVG svgNamed:@"products"] retain];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -16,15 +16,20 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)aDecoder
|
||||
- (id)initWithFrame:(NSRect)frameRect
|
||||
{
|
||||
if( ( self = [super initWithCoder:aDecoder] ) != nil )
|
||||
if( ( self = [super initWithFrame:frameRect] ) != nil )
|
||||
{
|
||||
svg = [[IJSVG svgNamed:@"test"] retain];
|
||||
svg = [self svg];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (IJSVG *)svg
|
||||
{
|
||||
return [[IJSVG svgNamed:@"test"] retain];
|
||||
}
|
||||
|
||||
- (void)drawRect:(NSRect)dirtyRect
|
||||
{
|
||||
CGContextRef ref = [[NSGraphicsContext currentContext] graphicsPort];
|
||||
|
||||
Reference in New Issue
Block a user