diff --git a/Classes/WDCanvasController.h b/Classes/WDCanvasController.h index 43a7898..0fe8fa0 100644 --- a/Classes/WDCanvasController.h +++ b/Classes/WDCanvasController.h @@ -11,8 +11,6 @@ #import #import "WDActionSheet.h" -#import "WDElement.h" -#import "WDStrokeStyle.h" @class WDCanvas; @class WDColorBalanceController; diff --git a/Classes/WDCanvasController.m b/Classes/WDCanvasController.m index d25e5f8..433d40e 100644 --- a/Classes/WDCanvasController.m +++ b/Classes/WDCanvasController.m @@ -11,7 +11,6 @@ #import #import -#import "WDAbstractPath.h" #import "WDButton.h" #import "WDCanvas.h" #import "WDCanvasController.h" @@ -30,7 +29,6 @@ #import "WDLayerController.h" #import "WDMenu.h" #import "WDMenuItem.h" -#import "WDPath.h" #import "WDPropertyManager.h" #import "WDRotateTool.h" #import "WDSelectionTool.h" diff --git a/Classes/WDColorAdjustmentController.m b/Classes/WDColorAdjustmentController.m index 379c0b8..c050583 100644 --- a/Classes/WDColorAdjustmentController.m +++ b/Classes/WDColorAdjustmentController.m @@ -14,7 +14,6 @@ #import "WDCanvas.h" #import "WDDrawingController.h" #import "WDColorAdjustmentController.h" -#import "WDDrawing.h" #import "WDModalTitleBar.h" #import "WDPaletteBackgroundView.h" #import "UIView+Additions.h" diff --git a/Classes/WDHueSaturationController.m b/Classes/WDHueSaturationController.m index 0839cd4..8f2ac50 100644 --- a/Classes/WDHueSaturationController.m +++ b/Classes/WDHueSaturationController.m @@ -12,7 +12,6 @@ #import "WDDrawingController.h" #import "WDColor.h" #import "WDColorSlider.h" -#import "WDElement.h" #import "WDHueSaturationController.h" #import "WDHueShifter.h" diff --git a/Classes/WDSelectionView.m b/Classes/WDSelectionView.m index fa7b0ba..69046c7 100644 --- a/Classes/WDSelectionView.m +++ b/Classes/WDSelectionView.m @@ -12,8 +12,6 @@ #import "WDBezierNode.h" #import "WDCanvas.h" #import "WDDrawingController.h" -#import "WDDrawing.h" -#import "WDElement.h" #import "WDGLUtilities.h" #import "WDLayer.h" #import "WDPath.h" diff --git a/Inkpad-Core/Controllers/WDDrawingController.m b/Inkpad-Core/Controllers/WDDrawingController.m index e7c36c6..f074bc5 100644 --- a/Inkpad-Core/Controllers/WDDrawingController.m +++ b/Inkpad-Core/Controllers/WDDrawingController.m @@ -16,11 +16,9 @@ #import "NSArray+Additions.h" #import "NSString+Additions.h" #import "UIImage+Additions.h" -#import "WDAbstractPath.h" #import "WDBezierNode.h" #import "WDColor.h" #import "WDCompoundPath.h" -#import "WDDrawing.h" #import "WDDrawingController.h" #import "WDDynamicGuideController.h" #import "WDFontManager.h" @@ -28,7 +26,6 @@ #import "WDImage.h" #import "WDInspectableProperties.h" #import "WDLayer.h" -#import "WDPath.h" #import "WDPathfinder.h" #import "WDPropertyManager.h" #import "WDText.h" diff --git a/Inkpad-Core/Controllers/WDPropertyManager.m b/Inkpad-Core/Controllers/WDPropertyManager.m index a636560..60b7c8a 100644 --- a/Inkpad-Core/Controllers/WDPropertyManager.m +++ b/Inkpad-Core/Controllers/WDPropertyManager.m @@ -9,7 +9,6 @@ // Copyright (c) 2011-2013 Steve Sprang // -#import "WDAbstractPath.h" #import "WDColor.h" #import "WDDrawingController.h" #import "WDFontManager.h" diff --git a/Inkpad-Core/Model/WDAbstractPath.h b/Inkpad-Core/Model/WDAbstractPath.h index cce027e..6c2722f 100644 --- a/Inkpad-Core/Model/WDAbstractPath.h +++ b/Inkpad-Core/Model/WDAbstractPath.h @@ -11,7 +11,6 @@ #import #import "WDStylable.h" -#import "WDStrokeStyle.h" @protocol WDPathPainter; diff --git a/Inkpad-Core/Model/WDAbstractPath.m b/Inkpad-Core/Model/WDAbstractPath.m index 9274be1..5e8bfff 100644 --- a/Inkpad-Core/Model/WDAbstractPath.m +++ b/Inkpad-Core/Model/WDAbstractPath.m @@ -13,7 +13,6 @@ #import #endif -#import "WDAbstractPath.h" #import "WDArrowhead.h" #import "WDColor.h" #import "WDCompoundPath.h" diff --git a/Inkpad-Core/Model/WDCurveFit.m b/Inkpad-Core/Model/WDCurveFit.m index fab3620..02befd7 100644 --- a/Inkpad-Core/Model/WDCurveFit.m +++ b/Inkpad-Core/Model/WDCurveFit.m @@ -11,7 +11,6 @@ #import "FitCurves.h" #import "WDBezierNode.h" -#import "WDBezierSegment.h" #import "WDCurveFit.h" #import "WDPath.h" #import "WDUtilities.h" diff --git a/Inkpad-Core/Model/WDDrawing.m b/Inkpad-Core/Model/WDDrawing.m index 7ce7afd..3f8c44e 100644 --- a/Inkpad-Core/Model/WDDrawing.m +++ b/Inkpad-Core/Model/WDDrawing.m @@ -16,8 +16,6 @@ #import "UIColor+Additions.h" #import "WDColor.h" #import "WDDocumentProtocol.h" -#import "WDDrawing.h" -#import "WDElement.h" #import "WDImage.h" #import "WDImageData.h" #import "WDLayer.h" diff --git a/Inkpad-Core/Model/WDElement.m b/Inkpad-Core/Model/WDElement.m index a15b0ea..34a0669 100644 --- a/Inkpad-Core/Model/WDElement.m +++ b/Inkpad-Core/Model/WDElement.m @@ -11,13 +11,10 @@ #import "UIColor+Additions.h" #import "WDColor.h" -#import "WDDrawing.h" -#import "WDElement.h" #import "WDGLUtilities.h" #import "WDGroup.h" #import "WDInspectableProperties.h" #import "WDLayer.h" -#import "WDPickResult.h" #import "WDPropertyManager.h" #import "WDShadow.h" #import "WDSVGHelper.h" diff --git a/Inkpad-Core/Model/WDImage.m b/Inkpad-Core/Model/WDImage.m index a89d9b8..f33b760 100644 --- a/Inkpad-Core/Model/WDImage.m +++ b/Inkpad-Core/Model/WDImage.m @@ -15,14 +15,11 @@ #endif #import "UIColor+Additions.h" -#import "WDBezierSegment.h" #import "WDColor.h" -#import "WDDrawing.h" #import "WDGLUtilities.h" #import "WDImage.h" #import "WDImageData.h" #import "WDLayer.h" -#import "WDPickResult.h" #import "WDShadow.h" #import "WDSVGHelper.h" #import "WDUtilities.h" diff --git a/Inkpad-Core/Model/WDLayer.m b/Inkpad-Core/Model/WDLayer.m index 2315d99..f785255 100644 --- a/Inkpad-Core/Model/WDLayer.m +++ b/Inkpad-Core/Model/WDLayer.m @@ -10,7 +10,6 @@ // #import "UIColor+Additions.h" -#import "WDDrawing.h" #import "WDElement.h" #import "WDLayer.h" #import "WDSVGHelper.h" @@ -180,7 +179,9 @@ - (WDXMLElement *) SVGElement } WDXMLElement *layer = [WDXMLElement elementWithName:@"g"]; - [layer setAttribute:@"id" value:[[WDSVGHelper sharedSVGHelper] uniqueIDWithPrefix:@"Layer"]]; + NSString *uniqueName = [[WDSVGHelper sharedSVGHelper] uniqueIDWithPrefix: + [@"Layer$" stringByAppendingString:name_]]; + [layer setAttribute:@"id" value:[uniqueName substringFromIndex:6]]; [layer setAttribute:@"inkpad:layerName" value:name_]; if (self.hidden) { diff --git a/Inkpad-Core/Model/WDPath.m b/Inkpad-Core/Model/WDPath.m index e3ca350..54c9726 100644 --- a/Inkpad-Core/Model/WDPath.m +++ b/Inkpad-Core/Model/WDPath.m @@ -12,7 +12,6 @@ #import "UIColor+Additions.h" #import "WDArrowhead.h" #import "WDBezierNode.h" -#import "WDBezierSegment.h" #import "WDColor.h" #import "WDCompoundPath.h" #import "WDFillTransform.h" diff --git a/Inkpad-Core/Model/WDText.m b/Inkpad-Core/Model/WDText.m index bed1b12..b479252 100644 --- a/Inkpad-Core/Model/WDText.m +++ b/Inkpad-Core/Model/WDText.m @@ -17,9 +17,7 @@ #import #import "NSString+Additions.h" #import "UIColor+Additions.h" -#import "WDBezierSegment.h" #import "WDColor.h" -#import "WDDrawing.h" #import "WDFillTransform.h" #import "WDFontManager.h" #import "WDGLUtilities.h" diff --git a/Inkpad-Core/Model/WDTextPath.m b/Inkpad-Core/Model/WDTextPath.m index 8b8d22e..f687b74 100644 --- a/Inkpad-Core/Model/WDTextPath.m +++ b/Inkpad-Core/Model/WDTextPath.m @@ -18,7 +18,6 @@ #import "NSString+Additions.h" #import "UIColor+Additions.h" #import "WDBezierNode.h" -#import "WDBezierSegment.h" #import "WDColor.h" #import "WDFillTransform.h" #import "WDFontManager.h" diff --git a/Inkpad-Core/SVG/WDSVGParser.h b/Inkpad-Core/SVG/WDSVGParser.h index 0298a87..6fa8b66 100644 --- a/Inkpad-Core/SVG/WDSVGParser.h +++ b/Inkpad-Core/SVG/WDSVGParser.h @@ -12,9 +12,6 @@ // #import -#import "WDDrawing.h" -#import "WDSVGElement.h" -#import "WDSVGParserStateStack.h" #import "WDSVGStyleParser.h" #import "WDSVGTransformParser.h" diff --git a/Inkpad-Core/SVG/WDSVGParser.m b/Inkpad-Core/SVG/WDSVGParser.m index 93515fd..efde4a1 100644 --- a/Inkpad-Core/SVG/WDSVGParser.m +++ b/Inkpad-Core/SVG/WDSVGParser.m @@ -20,8 +20,6 @@ #import "WDGroup.h" #import "WDImage.h" #import "WDLayer.h" -#import "WDPath.h" -#import "WDSVGElement.h" #import "WDSVGParser.h" #import "WDSVGPathParser.h" #import "WDText.h" @@ -136,6 +134,7 @@ - (CGAffineTransform) preserveAspectRatio:(NSString *)source withSize:(CGSize)si { NSArray *preserveAspectRatio = [[source lowercaseString] componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; BOOL slice = [preserveAspectRatio containsObject:@"slice"]; + BOOL notUniformScale = [preserveAspectRatio containsObject:@"none"]; enum {MIN, MID, MAX} xalign = MID, yalign = MID; for (NSString *token in preserveAspectRatio) { if ([token hasPrefix:@"xmin"]) { @@ -153,6 +152,7 @@ - (CGAffineTransform) preserveAspectRatio:(NSString *)source withSize:(CGSize)si } CGPoint translate = CGPointZero; CGSize scale = CGSizeMake(bounds.size.width / size.width, bounds.size.height / size.height); + if (notUniformScale) {} else if (((scale.width > scale.height) && slice) || ((scale.width < scale.height) && !slice)) { switch (xalign) { case MIN: diff --git a/Inkpad-Core/SVG/WDSVGStyleParser.m b/Inkpad-Core/SVG/WDSVGStyleParser.m index ca89b58..844f823 100644 --- a/Inkpad-Core/SVG/WDSVGStyleParser.m +++ b/Inkpad-Core/SVG/WDSVGStyleParser.m @@ -11,7 +11,6 @@ // Copyright (c) 2011-2013 Steve Sprang // -#import "WDAbstractPath.h" #import "WDColor.h" #import "WDFillTransform.h" #import "WDGradient.h" diff --git a/Inkpad-Core/Tools/WDEraserTool.m b/Inkpad-Core/Tools/WDEraserTool.m index 391b4d2..1375f9e 100644 --- a/Inkpad-Core/Tools/WDEraserTool.m +++ b/Inkpad-Core/Tools/WDEraserTool.m @@ -13,7 +13,6 @@ #import "WDCanvas.h" #import "WDColor.h" #import "WDCurveFit.h" -#import "WDDrawing.h" #import "WDDrawingController.h" #import "WDEraserTool.h" #import "WDPath.h" diff --git a/Inkpad-Core/Tools/WDEyedropperTool.m b/Inkpad-Core/Tools/WDEyedropperTool.m index 0744309..0d281fd 100644 --- a/Inkpad-Core/Tools/WDEyedropperTool.m +++ b/Inkpad-Core/Tools/WDEyedropperTool.m @@ -12,7 +12,6 @@ #import "WDEyedropperTool.h" #import "WDCanvas.h" #import "WDDrawingController.h" -#import "WDElement.h" #import "WDImage.h" #import "WDInspectableProperties.h" #import "WDPickResult.h" diff --git a/Inkpad-Core/Tools/WDFreehandTool.m b/Inkpad-Core/Tools/WDFreehandTool.m index ba25da8..fb1583a 100644 --- a/Inkpad-Core/Tools/WDFreehandTool.m +++ b/Inkpad-Core/Tools/WDFreehandTool.m @@ -13,7 +13,6 @@ #import "WDCanvas.h" #import "WDColor.h" #import "WDCurveFit.h" -#import "WDDrawing.h" #import "WDDrawingController.h" #import "WDFreehandTool.h" #import "WDInspectableProperties.h" diff --git a/Inkpad-Core/Tools/WDPenTool.m b/Inkpad-Core/Tools/WDPenTool.m index a4f46e1..a3a54d3 100644 --- a/Inkpad-Core/Tools/WDPenTool.m +++ b/Inkpad-Core/Tools/WDPenTool.m @@ -12,7 +12,6 @@ #import "WDBezierNode.h" #import "WDCanvas.h" #import "WDDrawingController.h" -#import "WDDrawing.h" #import "WDFillTransform.h" #import "WDInspectableProperties.h" #import "WDPath.h" diff --git a/Inkpad-Core/Tools/WDSelectionTool.m b/Inkpad-Core/Tools/WDSelectionTool.m index c5d0a28..dec4a87 100644 --- a/Inkpad-Core/Tools/WDSelectionTool.m +++ b/Inkpad-Core/Tools/WDSelectionTool.m @@ -9,7 +9,6 @@ // Copyright (c) 2011-2013 Steve Sprang // -#import "WDAbstractPath.h" #import "WDBezierNode.h" #import "WDCanvas.h" #import "WDCanvasController.h" @@ -18,7 +17,6 @@ #import "WDDynamicGuideController.h" #import "WDDrawingController.h" #import "WDFillTransform.h" -#import "WDPath.h" #import "WDPropertyManager.h" #import "WDSelectionTool.h" #import "WDTextPath.h" diff --git a/Inkpad-Core/Tools/WDShapeTool.m b/Inkpad-Core/Tools/WDShapeTool.m index 132b271..ce750e7 100644 --- a/Inkpad-Core/Tools/WDShapeTool.m +++ b/Inkpad-Core/Tools/WDShapeTool.m @@ -10,10 +10,8 @@ // -#import "WDAbstractPath.h" #import "WDBezierNode.h" #import "WDCanvas.h" -#import "WDDrawing.h" #import "WDDrawingController.h" #import "WDDynamicGuideController.h" #import "WDInspectableProperties.h" diff --git a/Inkpad-Core/Tools/WDTextTool.m b/Inkpad-Core/Tools/WDTextTool.m index ddb779e..d08a298 100644 --- a/Inkpad-Core/Tools/WDTextTool.m +++ b/Inkpad-Core/Tools/WDTextTool.m @@ -13,7 +13,6 @@ #import "WDCanvas.h" #import "WDCanvasController.h" #import "WDColor.h" -#import "WDDrawing.h" #import "WDDrawingController.h" #import "WDPath.h" #import "WDText.h" diff --git a/Inkpad-Core/Tools/WDTool.m b/Inkpad-Core/Tools/WDTool.m index 406c592..f99e9bf 100644 --- a/Inkpad-Core/Tools/WDTool.m +++ b/Inkpad-Core/Tools/WDTool.m @@ -10,7 +10,6 @@ // #import "WDCanvas.h" -#import "WDDrawing.h" #import "WDDrawingController.h" #import "WDPickResult.h" #import "WDTool.h" diff --git a/Inkpad-Core/livarot/Path.cpp b/Inkpad-Core/livarot/Path.cpp index f1b21be..512d576 100644 --- a/Inkpad-Core/livarot/Path.cpp +++ b/Inkpad-Core/livarot/Path.cpp @@ -8,7 +8,6 @@ #include "Path.h" #include "Shape.h" -#include "MyMath.h" #include diff --git a/Inkpad-Core/livarot/PathConversion.cpp b/Inkpad-Core/livarot/PathConversion.cpp index d687db3..e2f573c 100644 --- a/Inkpad-Core/livarot/PathConversion.cpp +++ b/Inkpad-Core/livarot/PathConversion.cpp @@ -8,7 +8,6 @@ #include "Path.h" #include "Shape.h" -#include "MyMath.h" void Path::ConvertWithBackData(float treshhold) { diff --git a/Inkpad-Core/livarot/ShapeSweep.cpp b/Inkpad-Core/livarot/ShapeSweep.cpp index 2c6b248..3d856f1 100644 --- a/Inkpad-Core/livarot/ShapeSweep.cpp +++ b/Inkpad-Core/livarot/ShapeSweep.cpp @@ -7,7 +7,6 @@ */ #include "Shape.h" -#include "LivarotDefs.h" #include "MyMath.h" diff --git a/Inkpad-Core/livarot/ShapeSweepUtils.cpp b/Inkpad-Core/livarot/ShapeSweepUtils.cpp index e021913..5103455 100644 --- a/Inkpad-Core/livarot/ShapeSweepUtils.cpp +++ b/Inkpad-Core/livarot/ShapeSweepUtils.cpp @@ -7,7 +7,6 @@ */ #include "Shape.h" -#include "LivarotDefs.h" #include "MyMath.h" SweepEvent::SweepEvent() diff --git a/Openclipart/OCAThumbnailCell.m b/Openclipart/OCAThumbnailCell.m index c79171d..66b284f 100644 --- a/Openclipart/OCAThumbnailCell.m +++ b/Openclipart/OCAThumbnailCell.m @@ -11,7 +11,6 @@ #import "OCAThumbnailCell.h" #import "OCAEntry.h" -#import "OCAThumbnailCache.h" #import "UIView+Additions.h" @interface OCAThumbnailCell ()