public java.awt.Shape getOutline(Shape shape){ int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 10800); GeneralPath path = new GeneralPath(); path.moveTo(adjval, 0); path.lineTo(0, 21600); path.lineTo(21600, 21600); path.closePath(); return path; } };
public java.awt.Shape getOutline(Shape shape){ int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 5400); GeneralPath path = new GeneralPath(); path.moveTo(0, 0); path.lineTo(adjval, 21600); path.lineTo(21600 - adjval, 21600); path.lineTo(21600, 0); path.closePath(); return path; } };
public java.awt.Shape getOutline(Shape shape){ int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 5400); GeneralPath path = new GeneralPath(); path.moveTo(adjval, 0); path.lineTo(21600, 0); path.lineTo(21600 - adjval, 21600); path.lineTo(0, 21600); path.closePath(); return path; } };
public java.awt.Shape getOutline(Shape shape){ //m0@0 l@1@0 @1,21600@2,21600@2@0,21600@0,10800,xe int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 5400); int adjval2 = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUST2VALUE, 5400); GeneralPath path = new GeneralPath(); path.moveTo(0, adjval); path.lineTo(adjval2, adjval); path.lineTo(adjval2, 21600); path.lineTo(21600-adjval2, 21600); path.lineTo(21600-adjval2, adjval); path.lineTo(21600, adjval); path.lineTo(10800, 0); path.closePath(); return path; } };
public java.awt.Shape getOutline(Shape shape){ int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 5400); GeneralPath path = new GeneralPath(); path.moveTo(adjval, 0); path.lineTo(21600 - adjval, 0); path.lineTo(21600, 10800); path.lineTo(21600 - adjval, 21600); path.lineTo(adjval, 21600); path.lineTo(0, 10800); path.closePath(); return path; } };
public java.awt.Shape getOutline(Shape shape){ //m@0, l@0@1,21600@1,21600@2@0@2@0,21600,,10800xe int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 5400); int adjval2 = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUST2VALUE, 5400); GeneralPath path = new GeneralPath(); path.moveTo(adjval, 0); path.lineTo(adjval, adjval2); path.lineTo(21600, adjval2); path.lineTo(21600, 21600-adjval2); path.lineTo(adjval, 21600-adjval2); path.lineTo(adjval, 21600); path.lineTo(0, 10800); path.closePath(); return path; } };
public java.awt.Shape getOutline(Shape shape){ //m0@0 l@1@0 @1,0 @2,0 @2@0,21600@0,10800,21600xe int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 16200); int adjval2 = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUST2VALUE, 5400); GeneralPath path = new GeneralPath(); path.moveTo(0, adjval); path.lineTo(adjval2, adjval); path.lineTo(adjval2, 0); path.lineTo(21600-adjval2, 0); path.lineTo(21600-adjval2, adjval); path.lineTo(21600, adjval); path.lineTo(10800, 21600); path.closePath(); return path; } };
public java.awt.Shape getOutline(Shape shape){ //m@0, l@0@1 ,0@1,0@2@0@2@0,21600,21600,10800xe int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 16200); int adjval2 = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUST2VALUE, 5400); GeneralPath path = new GeneralPath(); path.moveTo(adjval, 0); path.lineTo(adjval, adjval2); path.lineTo(0, adjval2); path.lineTo(0, 21600-adjval2); path.lineTo(adjval, 21600-adjval2); path.lineTo(adjval, 21600); path.lineTo(21600, 10800); path.closePath(); return path; } };
public java.awt.Shape getOutline(Shape shape){ int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 5400); RoundRectangle2D path = new RoundRectangle2D.Float(0, 0, 21600, 21600, adjval, adjval); return path; } };
public java.awt.Shape getOutline(Shape shape){ int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 6326); GeneralPath path = new GeneralPath(); path.moveTo(adjval, 0); path.lineTo(21600 - adjval, 0); path.lineTo(21600, adjval); path.lineTo(21600, 21600-adjval); path.lineTo(21600-adjval, 21600); path.lineTo(adjval, 21600); path.lineTo(0, 21600-adjval); path.lineTo(0, adjval); path.closePath(); return path; } };
public java.awt.Shape getOutline(Shape shape){ int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 5400); GeneralPath path = new GeneralPath(); path.moveTo(adjval, 0); path.lineTo(21600 - adjval, 0); path.lineTo(21600 - adjval, adjval); path.lineTo(21600, adjval); path.lineTo(21600, 21600-adjval); path.lineTo(21600-adjval, 21600-adjval); path.lineTo(21600-adjval, 21600); path.lineTo(adjval, 21600); path.lineTo(adjval, 21600-adjval); path.lineTo(0, 21600-adjval); path.lineTo(0, adjval); path.lineTo(adjval, adjval); path.closePath(); return path; } };
/** * Get the value of a simple escher property for this shape. * * @param propId The id of the property. One of the constants defined in EscherOptRecord. */ public int getEscherProperty(short propId){ EscherOptRecord opt = (EscherOptRecord)getEscherChild(_escherContainer, EscherOptRecord.RECORD_ID); EscherSimpleProperty prop = (EscherSimpleProperty)getEscherProperty(opt, propId); return prop == null ? 0 : prop.getPropertyValue(); }
/** * Get the value of a simple escher property for this shape. * * @param propId The id of the property. One of the constants defined in EscherOptRecord. */ public int getEscherProperty(short propId, int defaultValue){ EscherOptRecord opt = (EscherOptRecord)getEscherChild(_escherContainer, EscherOptRecord.RECORD_ID); EscherSimpleProperty prop = (EscherSimpleProperty)getEscherProperty(opt, propId); return prop == null ? defaultValue : prop.getPropertyValue(); }
public java.awt.Shape getOutline(Shape shape){ //m10800,qx0@1l0@2qy10800,21600,21600@2l21600@1qy10800,xem0@1qy10800@0,21600@1nfe int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 5400); GeneralPath path = new GeneralPath(); path.append(new Arc2D.Float(0, 0, 21600, adjval, 0, 180, Arc2D.OPEN), false); path.moveTo(0, adjval/2); path.lineTo(0, 21600 - adjval/2); path.closePath(); path.append(new Arc2D.Float(0, 21600 - adjval, 21600, adjval, 180, 180, Arc2D.OPEN), false); path.moveTo(21600, 21600 - adjval/2); path.lineTo(21600, adjval/2); path.append(new Arc2D.Float(0, 0, 21600, adjval, 180, 180, Arc2D.OPEN), false); path.moveTo(0, adjval/2); path.closePath(); return path; } };
public java.awt.Shape getOutline(Shape shape){ //m,qx10800@0 l10800@2qy21600@11,10800@3l10800@1qy,21600e int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 1800); int adjval2 = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUST2VALUE, 10800); GeneralPath path = new GeneralPath(); path.moveTo(0, 0); path.append(new Arc2D.Float(-10800, 0, 21600, adjval*2, 0, 90, Arc2D.OPEN), false); path.moveTo(10800, adjval); path.lineTo(10800, adjval2 - adjval); path.append(new Arc2D.Float(10800, adjval2 - 2*adjval, 21600, adjval*2, 180, 90, Arc2D.OPEN), false); path.moveTo(21600, adjval2); path.append(new Arc2D.Float(10800, adjval2, 21600, adjval*2, 90, 90, Arc2D.OPEN), false); path.moveTo(10800, adjval2 + adjval); path.lineTo(10800, 21600 - adjval); path.append(new Arc2D.Float(-10800, 21600 - 2*adjval, 21600, adjval*2, 270, 90, Arc2D.OPEN), false); return path; } };
public java.awt.Shape getOutline(Shape shape){ //m21600,qx10800@0l10800@2qy0@11,10800@3l10800@1qy21600,21600e int adjval = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUSTVALUE, 1800); int adjval2 = shape.getEscherProperty(EscherProperties.GEOMETRY__ADJUST2VALUE, 10800); GeneralPath path = new GeneralPath(); path.moveTo(21600, 0); path.append(new Arc2D.Float(10800, 0, 21600, adjval*2, 90, 90, Arc2D.OPEN), false); path.moveTo(10800, adjval); path.lineTo(10800, adjval2 - adjval); path.append(new Arc2D.Float(-10800, adjval2 - 2*adjval, 21600, adjval*2, 270, 90, Arc2D.OPEN), false); path.moveTo(0, adjval2); path.append(new Arc2D.Float(-10800, adjval2, 21600, adjval*2, 0, 90, Arc2D.OPEN), false); path.moveTo(10800, adjval2 + adjval); path.lineTo(10800, 21600 - adjval); path.append(new Arc2D.Float(10800, 21600 - 2*adjval, 21600, adjval*2, 180, 90, Arc2D.OPEN), false); return path; } };
/** * Returns fill type. * Must be one of the <code>FILL_*</code> constants defined in this class. * * @return type of fill */ public int getFillType(){ EscherOptRecord opt = (EscherOptRecord)Shape.getEscherChild(shape.getSpContainer(), EscherOptRecord.RECORD_ID); EscherSimpleProperty prop = (EscherSimpleProperty)Shape.getEscherProperty(opt, EscherProperties.FILL__FILLTYPE); return prop == null ? FILL_SOLID : prop.getPropertyValue(); }
/** * Background color */ public Color getBackgroundColor(){ EscherOptRecord opt = (EscherOptRecord)Shape.getEscherChild(shape.getSpContainer(), EscherOptRecord.RECORD_ID); EscherSimpleProperty p = (EscherSimpleProperty)Shape.getEscherProperty(opt, EscherProperties.FILL__NOFILLHITTEST); if(p != null && (p.getPropertyValue() & 0x10) == 0) return null; return shape.getColor(EscherProperties.FILL__FILLBACKCOLOR, EscherProperties.FILL__FILLOPACITY, -1); }
/** * Foreground color */ public Color getForegroundColor(){ EscherOptRecord opt = (EscherOptRecord)Shape.getEscherChild(shape.getSpContainer(), EscherOptRecord.RECORD_ID); EscherSimpleProperty p = (EscherSimpleProperty)Shape.getEscherProperty(opt, EscherProperties.FILL__NOFILLHITTEST); if(p != null && (p.getPropertyValue() & 0x10) == 0) return null; return shape.getColor(EscherProperties.FILL__FILLCOLOR, EscherProperties.FILL__FILLOPACITY, -1); }
/** */ protected void afterInsert(Sheet sh){ EscherOptRecord opt = (EscherOptRecord)Shape.getEscherChild(shape.getSpContainer(), EscherOptRecord.RECORD_ID); EscherSimpleProperty p = (EscherSimpleProperty)Shape.getEscherProperty(opt, EscherProperties.FILL__PATTERNTEXTURE); if(p != null) { int idx = p.getPropertyValue(); EscherBSERecord bse = getEscherBSERecord(idx); bse.setRef(bse.getRef() + 1); } }