Changeset 7676 in josm for trunk/src/com/kitfox/svg
- Timestamp:
- 2014-10-30T11:39:47+01:00 (10 years ago)
- Location:
- trunk/src/com/kitfox/svg
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/kitfox/svg/ClipPath.java
r6002 r7676 131 131 * all attributes with track information. 132 132 * 133 * @param curTime 133 134 * @return - true if this node has changed state as a result of the time 134 135 * update 136 * @throws com.kitfox.svg.SVGException 135 137 */ 136 138 public boolean updateTime(double curTime) throws SVGException … … 160 162 } 161 163 164 for (int i = 0; i < children.size(); ++i) 165 { 166 SVGElement ele = (SVGElement) children.get(i); 167 ele.updateTime(curTime); 168 } 169 162 170 return shapeChange; 163 171 } -
trunk/src/com/kitfox/svg/Group.java
r6002 r7676 160 160 //Do not process offscreen groups 161 161 boolean ignoreClip = diagram.ignoringClipHeuristic(); 162 if (!ignoreClip && outsideClip(g))163 {164 return;165 }162 // if (!ignoreClip && outsideClip(g)) 163 // { 164 // return; 165 // } 166 166 167 167 beginLayer(g); … … 271 271 RenderableElement rendEle = (RenderableElement) ele; 272 272 Rectangle2D bounds = rendEle.getBoundingBox(); 273 if (bounds != null )273 if (bounds != null && (bounds.getWidth() != 0 || bounds.getHeight() != 0)) 274 274 { 275 275 if (retRect == null) 276 276 { 277 277 retRect = bounds; 278 } else 278 } 279 else 279 280 { 280 retRect = retRect.createUnion(bounds); 281 if (retRect.getWidth() != 0 || retRect.getHeight() != 0) 282 { 283 retRect = retRect.createUnion(bounds); 284 } 281 285 } 282 286 } -
trunk/src/com/kitfox/svg/ImageSVG.java
r6002 r7676 124 124 { 125 125 Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, 126 "Could not parse xlink:href ", e);126 "Could not parse xlink:href " + src, e); 127 127 // e.printStackTrace(); 128 128 imageSrc = null; -
trunk/src/com/kitfox/svg/RadialGradient.java
r6002 r7676 121 121 Point2D.Float pt1 = new Point2D.Float(cx, cy); 122 122 Point2D.Float pt2 = new Point2D.Float(fx, fy); 123 if (pt1.equals(pt2)) 124 { 125 Color[] colors = getStopColors(); 126 paint = colors.length > 0 ? colors[0] : Color.black; 127 } else if (gradientUnits == GU_USER_SPACE_ON_USE) 123 if (gradientUnits == GU_USER_SPACE_ON_USE) 128 124 { 129 125 paint = new com.kitfox.svg.batik.RadialGradientPaint( -
trunk/src/com/kitfox/svg/SVGDiagram.java
r6002 r7676 103 103 public void render(Graphics2D g) throws SVGException 104 104 { 105 root.render (g);105 root.renderToViewport(g); 106 106 } 107 107 -
trunk/src/com/kitfox/svg/SVGElement.java
r6002 r7676 588 588 static public AffineTransform parseSingleTransform(String val) throws SVGException 589 589 { 590 final Matcher matchWord = Pattern.compile(" [-.\\w]+").matcher("");590 final Matcher matchWord = Pattern.compile("([a-zA-Z]+|-?\\d+(\\.\\d+)?|-?\\.\\d+)").matcher(""); 591 591 592 592 AffineTransform retXform = new AffineTransform(); -
trunk/src/com/kitfox/svg/SVGRoot.java
r6002 r7676 44 44 import java.awt.Shape; 45 45 import java.awt.geom.AffineTransform; 46 import java.awt.geom.NoninvertibleTransformException; 47 import java.awt.geom.Point2D; 46 48 import java.awt.geom.Rectangle2D; 49 import java.util.List; 47 50 48 51 /** … … 239 242 clipRect.setRect(xx, yy, ww, hh); 240 243 244 // if (viewBox == null) 245 // { 246 // viewXform.setToIdentity(); 247 // } 248 // else 249 // { 250 // //If viewport window is set, we are drawing to entire viewport 251 // clipRect.setRect(deviceViewport); 252 // 253 // viewXform.setToIdentity(); 254 // viewXform.setToTranslation(deviceViewport.x, deviceViewport.y); 255 // viewXform.scale(deviceViewport.width, deviceViewport.height); 256 // viewXform.scale(1 / viewBox.width, 1 / viewBox.height); 257 // viewXform.translate(-viewBox.x, -viewBox.y); 258 // } 259 } 260 261 public void renderToViewport(Graphics2D g) throws SVGException 262 { 263 prepareViewport(); 264 241 265 if (viewBox == null) 242 266 { … … 245 269 else 246 270 { 247 viewXform.setToTranslation(clipRect.x, clipRect.y); 248 viewXform.scale(clipRect.width, clipRect.height); 271 Rectangle deviceViewport = g.getClipBounds(); 272 //If viewport window is set, we are drawing to entire viewport 273 clipRect.setRect(deviceViewport); 274 275 viewXform.setToIdentity(); 276 viewXform.setToTranslation(deviceViewport.x, deviceViewport.y); 277 viewXform.scale(deviceViewport.width, deviceViewport.height); 249 278 viewXform.scale(1 / viewBox.width, 1 / viewBox.height); 250 279 viewXform.translate(-viewBox.x, -viewBox.y); 251 280 } 252 }253 254 public void render(Graphics2D g) throws SVGException255 {256 prepareViewport();257 281 258 282 AffineTransform cachedXform = g.getTransform(); … … 262 286 263 287 g.setTransform(cachedXform); 288 } 289 290 public void pick(Rectangle2D pickArea, AffineTransform ltw, boolean boundingBox, List retVec) throws SVGException 291 { 292 if (viewXform != null) 293 { 294 ltw = new AffineTransform(ltw); 295 ltw.concatenate(viewXform); 296 } 297 298 super.pick(pickArea, ltw, boundingBox, retVec); 299 } 300 301 public void pick(Point2D point, boolean boundingBox, List retVec) throws SVGException 302 { 303 Point2D xPoint = new Point2D.Double(point.getX(), point.getY()); 304 if (viewXform != null) 305 { 306 try 307 { 308 viewXform.inverseTransform(point, xPoint); 309 } catch (NoninvertibleTransformException ex) 310 { 311 throw new SVGException(ex); 312 } 313 } 314 315 super.pick(xPoint, boundingBox, retVec); 264 316 } 265 317 -
trunk/src/com/kitfox/svg/SVGUniverse.java
r6617 r7676 55 55 import java.net.URISyntaxException; 56 56 import java.net.URL; 57 import java.net.URLConnection; 58 import java.net.URLStreamHandler; 57 import java.util.ArrayList; 59 58 import java.util.HashMap; 60 59 import java.util.Iterator; … … 389 388 { 390 389 //Workaround for resources stored in jars loaded by Webstart. 391 //http s://bugs.openjdk.java.net/browse/JDK-6753651390 //http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6753651 392 391 url = SVGUniverse.class.getResource("xmlBase.getPath()"); 393 392 } … … 627 626 } 628 627 629 // public static void main(String argv[]) 630 // { 631 // try 632 // { 633 // URL url = new URL("svgSalamander", "localhost", -1, "abc.svg", 634 // new URLStreamHandler() 635 // { 636 // protected URLConnection openConnection(URL u) 637 // { 638 // return null; 639 // } 640 // } 641 // ); 642 //// URL url2 = new URL("svgSalamander", "localhost", -1, "abc.svg"); 643 // 644 // //Investigate URI resolution 645 // URI uriA, uriB, uriC, uriD, uriE; 646 // 647 // uriA = new URI("svgSalamander", "/names/mySpecialName", null); 648 //// uriA = new URI("http://www.kitfox.com/salamander"); 649 //// uriA = new URI("svgSalamander://mySpecialName/grape"); 650 // System.err.println(uriA.toString()); 651 // System.err.println(uriA.getScheme()); 652 // 653 // uriB = uriA.resolve("#begin"); 654 // System.err.println(uriB.toString()); 655 // 656 // uriC = uriA.resolve("tree#boing"); 657 // System.err.println(uriC.toString()); 658 // 659 // uriC = uriA.resolve("../tree#boing"); 660 // System.err.println(uriC.toString()); 661 // } 662 // catch (Exception e) 663 // { 664 // Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, 665 // "Could not parse", e); 666 // } 667 // } 628 /** 629 * Get list of uris of all loaded documents and subdocuments. 630 * @return 631 */ 632 public ArrayList getLoadedDocumentURIs() 633 { 634 return new ArrayList(loadedDocs.keySet()); 635 } 636 637 /** 638 * Remove loaded document from cache. 639 * @param uri 640 */ 641 public void removeDocument(URI uri) 642 { 643 loadedDocs.remove(uri); 644 } 645 668 646 public boolean isVerbose() 669 647 { -
trunk/src/com/kitfox/svg/ShapeElement.java
r6002 r7676 87 87 void pick(Point2D point, boolean boundingBox, List retVec) throws SVGException 88 88 { 89 StyleAttribute styleAttrib = new StyleAttribute();89 // StyleAttribute styleAttrib = new StyleAttribute(); 90 90 // if (getStyle(styleAttrib.setName("fill")) && getShape().contains(point)) 91 91 if ((boundingBox ? getBoundingBox() : getShape()).contains(point)) -
trunk/src/com/kitfox/svg/Text.java
r6002 r7676 42 42 import java.awt.geom.AffineTransform; 43 43 import java.awt.geom.GeneralPath; 44 import java.awt.geom.Point2D; 44 45 import java.awt.geom.Rectangle2D; 45 46 import java.util.Iterator; … … 209 210 } else 210 211 { 211 fontWeight = TXWE_ BOLD;212 fontWeight = TXWE_NORMAL; 212 213 } 213 214 … … 352 353 { 353 354 AffineTransform at = new AffineTransform(); 354 at.translate(-textPath.getBounds 2D().getWidth() / 2, 0);355 at.translate(-textPath.getBounds().getWidth() / 2, 0); 355 356 textPath.transform(at); 356 357 break; … … 359 360 { 360 361 AffineTransform at = new AffineTransform(); 361 at.translate(-textPath.getBounds 2D().getWidth(), 0);362 at.translate(-textPath.getBounds().getWidth(), 0); 362 363 textPath.transform(at); 363 364 break; … … 390 391 if (obj instanceof String) 391 392 { 392 String text = (String) obj; 393 String text = (String)obj; 394 text = text.trim(); 393 395 394 396 Shape textShape = font.createGlyphVector(frc, text).getOutline(cursorX, cursorY); … … 415 417 416 418 417 Tspan tspan = (Tspan) obj; 418 tspan.setCursorX(cursorX); 419 tspan.setCursorY(cursorY); 420 tspan.addShape(textPath); 421 cursorX = tspan.getCursorX(); 422 cursorY = tspan.getCursorY(); 419 Tspan tspan = (Tspan)obj; 420 Point2D cursor = new Point2D.Float(cursorX, cursorY); 421 // tspan.setCursorX(cursorX); 422 // tspan.setCursorY(cursorY); 423 tspan.appendToShape(textPath, cursor); 424 // cursorX = tspan.getCursorX(); 425 // cursorY = tspan.getCursorY(); 426 cursorX = (float)cursor.getX(); 427 cursorY = (float)cursor.getY(); 423 428 424 429 } … … 430 435 { 431 436 AffineTransform at = new AffineTransform(); 432 at.translate(-textPath.getBounds 2D().getWidth() / 2, 0);437 at.translate(-textPath.getBounds().getWidth() / 2, 0); 433 438 textPath.transform(at); 434 439 break; … … 437 442 { 438 443 AffineTransform at = new AffineTransform(); 439 at.translate(- textPath.getBounds2D().getWidth(), 0);444 at.translate(-Math.ceil(textPath.getBounds().getWidth()), 0); 440 445 textPath.transform(at); 441 446 break; -
trunk/src/com/kitfox/svg/TransformableElement.java
r6002 r7676 71 71 public AffineTransform getXForm() 72 72 { 73 return xform != null ? new AffineTransform(xform) : null;73 return xform == null ? null : new AffineTransform(xform); 74 74 } 75 75 /* -
trunk/src/com/kitfox/svg/Tspan.java
r6002 r7676 44 44 import java.awt.geom.AffineTransform; 45 45 import java.awt.geom.GeneralPath; 46 import java.awt.geom.Point2D; 46 47 import java.awt.geom.Rectangle2D; 47 48 … … 60 61 float[] rotate = null; 61 62 private String text = ""; 62 float cursorX;63 float cursorY;63 // float cursorX; 64 // float cursorY; 64 65 65 66 // Shape tspanShape; … … 76 77 } 77 78 78 public float getCursorX()79 {80 return cursorX;81 }82 83 public float getCursorY()84 {85 return cursorY;86 }87 88 public void setCursorX(float cursorX)89 {90 this.cursorX = cursorX;91 }92 93 public void setCursorY(float cursorY)94 {95 this.cursorY = cursorY;96 }79 // public float getCursorX() 80 // { 81 // return cursorX; 82 // } 83 // 84 // public float getCursorY() 85 // { 86 // return cursorY; 87 // } 88 // 89 // public void setCursorX(float cursorX) 90 // { 91 // this.cursorX = cursorX; 92 // } 93 // 94 // public void setCursorY(float cursorY) 95 // { 96 // this.cursorY = cursorY; 97 // } 97 98 /* 98 99 public void loaderStartElement(SVGLoaderHelper helper, Attributes attrs, SVGElement parent) … … 165 166 } 166 167 167 public void a ddShape(GeneralPath addShape) throws SVGException168 { 169 if (x != null)170 {171 cursorX = x[0];172 } else if (dx != null)173 {174 cursorX += dx[0];175 }176 177 if (y != null)178 {179 cursorY = y[0];180 } else if (dy != null)181 {182 cursorY += dy[0];183 }168 public void appendToShape(GeneralPath addShape, Point2D cursor) throws SVGException 169 { 170 // if (x != null) 171 // { 172 // cursorX = x[0]; 173 // } else if (dx != null) 174 // { 175 // cursorX += dx[0]; 176 // } 177 // 178 // if (y != null) 179 // { 180 // cursorY = y[0]; 181 // } else if (dy != null) 182 // { 183 // cursorY += dy[0]; 184 // } 184 185 185 186 StyleAttribute sty = new StyleAttribute(); … … 209 210 if (font == null) 210 211 { 211 addShapeSysFont(addShape, font, fontFamily, fontSize, letterSpacing );212 addShapeSysFont(addShape, font, fontFamily, fontSize, letterSpacing, cursor); 212 213 return; 213 214 } … … 221 222 strokeWidthScalar = 1f / fontScale; 222 223 223 int posPtr = 1; 224 225 for (int i = 0; i < text.length(); i++) 226 { 224 float cursorX = (float)cursor.getX(); 225 float cursorY = (float)cursor.getY(); 226 227 // int i = 0; 228 229 String drawText = this.text; 230 drawText = drawText.trim(); 231 for (int i = 0; i < drawText.length(); i++) 232 { 233 if (x != null && i < x.length) 234 { 235 cursorX = x[i]; 236 } else if (dx != null && i < dx.length) 237 { 238 cursorX += dx[i]; 239 } 240 241 if (y != null && i < y.length) 242 { 243 cursorY = y[i]; 244 } else if (dy != null && i < dy.length) 245 { 246 cursorY += dy[i]; 247 } 248 // i++; 249 227 250 xform.setToIdentity(); 228 251 xform.setToTranslation(cursorX, cursorY); … … 230 253 if (rotate != null) 231 254 { 232 xform.rotate(rotate[ posPtr]);233 } 234 235 String unicode = text.substring(i, i + 1);255 xform.rotate(rotate[i]); 256 } 257 258 String unicode = drawText.substring(i, i + 1); 236 259 MissingGlyph glyph = font.getGlyph(unicode); 237 260 … … 243 266 } 244 267 245 if (x != null && posPtr < x.length)246 {247 cursorX = x[posPtr];248 cursorY = y[posPtr++];249 } else if (dx != null && posPtr < dx.length)250 {251 cursorX += dx[posPtr];252 cursorY += dy[posPtr++];253 }254 255 268 cursorX += fontScale * glyph.getHorizAdvX() + letterSpacing; 256 269 } 257 270 271 //Save final draw point so calling method knows where to begin next 272 // text draw 273 cursor.setLocation(cursorX, cursorY); 258 274 strokeWidthScalar = 1f; 259 275 } 260 276 261 277 private void addShapeSysFont(GeneralPath addShape, Font font, 262 String fontFamily, float fontSize, float letterSpacing) 263 { 278 String fontFamily, float fontSize, float letterSpacing, Point2D cursor) 279 { 280 264 281 java.awt.Font sysFont = new java.awt.Font(fontFamily, java.awt.Font.PLAIN, (int) fontSize); 265 282 266 283 FontRenderContext frc = new FontRenderContext(null, true, true); 267 GlyphVector textVector = sysFont.createGlyphVector(frc, text);284 String renderText = this.text.trim(); 268 285 269 286 AffineTransform xform = new AffineTransform(); 270 287 271 int posPtr = 1; 272 for (int i = 0; i < text.length(); i++) 273 { 288 float cursorX = (float)cursor.getX(); 289 float cursorY = (float)cursor.getY(); 290 // int i = 0; 291 for (int i = 0; i < renderText.length(); i++) 292 { 293 if (x != null && i < x.length) 294 { 295 cursorX = x[i]; 296 } else if (dx != null && i < dx.length) 297 { 298 cursorX += dx[i]; 299 } 300 301 if (y != null && i < y.length) 302 { 303 cursorY = y[i]; 304 } else if (dy != null && i < dy.length) 305 { 306 cursorY += dy[i]; 307 } 308 // i++; 309 274 310 xform.setToIdentity(); 275 xform.setToTranslation(cursorX + i * letterSpacing, cursorY);311 xform.setToTranslation(cursorX, cursorY); 276 312 if (rotate != null) 277 313 { … … 279 315 } 280 316 281 String unicode = text.substring(i, i + 1); 282 Shape glyphOutline = textVector.getGlyphOutline(i); 283 GlyphMetrics glyphMetrics = textVector.getGlyphMetrics(i); 317 // String unicode = renderText.substring(i, i + 1); 318 GlyphVector textVector = sysFont.createGlyphVector(frc, renderText.substring(i, i + 1)); 319 Shape glyphOutline = textVector.getGlyphOutline(0); 320 GlyphMetrics glyphMetrics = textVector.getGlyphMetrics(0); 284 321 285 322 glyphOutline = xform.createTransformedShape(glyphOutline); 286 323 addShape.append(glyphOutline, false); 287 324 288 if (x != null && posPtr < x.length) 289 { 290 cursorX = x[posPtr]; 291 cursorY = y[posPtr++]; 292 } else if (dx != null && posPtr < dx.length) 293 { 294 cursorX += dx[posPtr]; 295 cursorY += dy[posPtr++]; 296 } 297 } 325 326 // cursorX += fontScale * glyph.getHorizAdvX() + letterSpacing; 327 cursorX += glyphMetrics.getAdvance() + letterSpacing; 328 } 329 330 cursor.setLocation(cursorX, cursorY); 298 331 } 299 332 300 333 public void render(Graphics2D g) throws SVGException 301 334 { 335 float cursorX = 0; 336 float cursorY = 0; 337 302 338 if (x != null) 303 339 { … … 385 421 protected void renderSysFont(Graphics2D g, java.awt.Font font) throws SVGException 386 422 { 423 float cursorX = 0; 424 float cursorY = 0; 425 387 426 int posPtr = 1; 388 427 FontRenderContext frc = g.getFontRenderContext(); -
trunk/src/com/kitfox/svg/Use.java
r6002 r7676 124 124 } 125 125 126 RenderableElement rendEle = (RenderableElement) 126 RenderableElement rendEle = (RenderableElement)ref; 127 127 rendEle.pushParentContext(this); 128 128 rendEle.render(g); -
trunk/src/com/kitfox/svg/app/beans/SVGIcon.java
r6002 r7676 51 51 { 52 52 public static final long serialVersionUID = 1; 53 54 private PropertyChangeSupport changes = new PropertyChangeSupport(this); 53 54 public static final String PROP_AUTOSIZE = "PROP_AUTOSIZE"; 55 56 private final PropertyChangeSupport changes = new PropertyChangeSupport(this); 55 57 56 58 SVGUniverse svgUniverse = SVGCache.getSVGUniverse(); … … 63 65 private boolean clipToViewbox; 64 66 65 // private String svgPath;66 67 URI svgURI; 67 68 68 private boolean scaleToFit;69 // private boolean scaleToFit; 69 70 AffineTransform scaleXform = new AffineTransform(); 70 71 // Dimension preferredSize = new Dimension(100, 100); 71 72 public static final int AUTOSIZE_NONE = 0; 73 public static final int AUTOSIZE_HORIZ = 1; 74 public static final int AUTOSIZE_VERT = 2; 75 public static final int AUTOSIZE_BESTFIT = 3; 76 public static final int AUTOSIZE_STRETCH = 4; 77 private int autosize = AUTOSIZE_NONE; 78 72 79 Dimension preferredSize; 73 80 … … 92 99 public int getIconHeight() 93 100 { 94 if (scaleToFit && preferredSize != null) 101 if (preferredSize != null && 102 (autosize == AUTOSIZE_VERT || autosize == AUTOSIZE_STRETCH 103 || autosize == AUTOSIZE_BESTFIT)) 95 104 { 96 105 return preferredSize.height; … … 110 119 public int getIconWidth() 111 120 { 112 if (scaleToFit && preferredSize != null) 121 if (preferredSize != null && 122 (autosize == AUTOSIZE_HORIZ || autosize == AUTOSIZE_STRETCH 123 || autosize == AUTOSIZE_BESTFIT)) 113 124 { 114 125 return preferredSize.width; … … 172 183 173 184 174 175 if (!scaleToFit) 185 if (autosize == AUTOSIZE_NONE) 176 186 { 177 187 try … … 210 220 211 221 212 final Rectangle2D.Double rect = new Rectangle2D.Double(); 213 diagram.getViewRect(rect); 214 215 scaleXform.setToScale(width / rect.width, height / rect.height); 222 // final Rectangle2D.Double rect = new Rectangle2D.Double(); 223 // diagram.getViewRect(rect); 224 // 225 // scaleXform.setToScale(width / rect.width, height / rect.height); 226 double diaWidth = diagram.getWidth(); 227 double diaHeight = diagram.getHeight(); 228 229 double scaleW = 1; 230 double scaleH = 1; 231 if (autosize == AUTOSIZE_BESTFIT) 232 { 233 scaleW = scaleH = (height / diaHeight < width / diaWidth) 234 ? height / diaHeight : width / diaWidth; 235 } 236 else if (autosize == AUTOSIZE_HORIZ) 237 { 238 scaleW = scaleH = width / diaWidth; 239 } 240 else if (autosize == AUTOSIZE_VERT) 241 { 242 scaleW = scaleH = height / diaHeight; 243 } 244 else if (autosize == AUTOSIZE_STRETCH) 245 { 246 scaleW = width / diaWidth; 247 scaleH = height / diaHeight; 248 } 249 scaleXform.setToScale(scaleW, scaleH); 216 250 217 251 AffineTransform oldXform = g.getTransform(); … … 315 349 * If this SVG document has a viewbox, if scaleToFit is set, will scale the viewbox to match the 316 350 * preferred size of this icon 351 * @deprecated 352 * @return 317 353 */ 318 354 public boolean isScaleToFit() 319 355 { 320 return scaleToFit; 321 } 322 356 return autosize == AUTOSIZE_STRETCH; 357 } 358 359 /** 360 * @deprecated 361 * @return 362 */ 323 363 public void setScaleToFit(boolean scaleToFit) 324 364 { 325 boolean old = this.scaleToFit; 326 this.scaleToFit = scaleToFit; 327 changes.firePropertyChange("scaleToFit", old, scaleToFit); 365 setAutosize(AUTOSIZE_STRETCH); 366 // boolean old = this.scaleToFit; 367 // this.scaleToFit = scaleToFit; 368 // firePropertyChange("scaleToFit", old, scaleToFit); 328 369 } 329 370 … … 429 470 this.clipToViewbox = clipToViewbox; 430 471 } 431 472 473 /** 474 * @return the autosize 475 */ 476 public int getAutosize() 477 { 478 return autosize; 479 } 480 481 /** 482 * @param autosize the autosize to set 483 */ 484 public void setAutosize(int autosize) 485 { 486 int oldAutosize = this.autosize; 487 this.autosize = autosize; 488 changes.firePropertyChange(PROP_AUTOSIZE, oldAutosize, autosize); 489 } 490 432 491 } -
trunk/src/com/kitfox/svg/pattern/PatternPaintContext.java
r6002 r7676 97 97 { 98 98 //System.err.println("" + x + ", " + y + ", " + w + ", " + h); 99 if (buf == null || buf.getWidth() != w || buf.getHeight() != buf.getHeight())99 if (buf == null || buf.getWidth() != w || buf.getHeight() != h) 100 100 { 101 101 buf = new BufferedImage(w, h, source.getType()); -
trunk/src/com/kitfox/svg/xml/ColorTable.java
r6002 r7676 225 225 Color retVal = null; 226 226 227 if ("".equals(val)) 228 { 229 return null; 230 } 231 227 232 if (val.charAt(0) == '#') 228 233 { -
trunk/src/com/kitfox/svg/xml/cpx/CPXInputStream.java
r6002 r7676 39 39 import com.kitfox.svg.SVGConst; 40 40 import java.io.*; 41 import java.util.*;42 41 import java.util.zip.*; 43 42 import java.security.*; 44 43 import java.util.logging.Level; 45 44 import java.util.logging.Logger; 46 import javax.crypto.*;47 45 48 46 /** -
trunk/src/com/kitfox/svg/xml/cpx/CPXOutputStream.java
r6002 r7676 39 39 import java.io.*; 40 40 import java.util.zip.*; 41 import java.security.*;42 import javax.crypto.*;43 41 44 42 /**
Note:
See TracChangeset
for help on using the changeset viewer.