switch ( stroke.getLineJoin() ) { case BasicStroke.JOIN_BEVEL:
/** * Set the line style of the series * * @param basicStroke */ public DialSeries setLineStyle(BasicStroke basicStroke) { stroke = basicStroke; if (this.lineWidth > 0.0f) { stroke = new BasicStroke( lineWidth, this.stroke.getEndCap(), this.stroke.getLineJoin(), this.stroke.getMiterLimit(), this.stroke.getDashArray(), this.stroke.getDashPhase()); } return this; }
/** * Set the line style of the series * * @param basicStroke */ public AxesChartSeries setLineStyle(BasicStroke basicStroke) { stroke = basicStroke; if (this.lineWidth > 0.0f) { stroke = new BasicStroke( lineWidth, this.stroke.getEndCap(), this.stroke.getLineJoin(), this.stroke.getMiterLimit(), this.stroke.getDashArray(), this.stroke.getDashPhase()); } return this; }
/** * Set the line style of the series * * @param basicStroke */ public RadarSeries setLineStyle(BasicStroke basicStroke) { stroke = basicStroke; if (this.lineWidth > 0.0f) { stroke = new BasicStroke( lineWidth, this.stroke.getEndCap(), this.stroke.getLineJoin(), this.stroke.getMiterLimit(), this.stroke.getDashArray(), this.stroke.getDashPhase()); } return this; }
bs.getLineWidth() + strokeWidthAdjustment, bs.getEndCap(), bs.getLineJoin(), bs.getMiterLimit(), bs.getDashArray(),
/** * @see java.awt.BasicStroke#getLineJoin() */ public int getLineJoin() { return stroke.getLineJoin(); }
: existingLineStyle.getLineWidth(), existingLineStyle.getEndCap(), existingLineStyle.getLineJoin(), existingLineStyle.getMiterLimit(), existingLineStyle.getDashArray(),
2f, baseLineStyle.getEndCap(), baseLineStyle.getLineJoin(), baseLineStyle.getMiterLimit(), new float[] {5, 5},
private Stroke copyOf(Stroke s) { if (s == null) { return null; } if (s instanceof BasicStroke) { BasicStroke bs = (BasicStroke) s; return new BasicStroke(bs.getLineWidth(), bs.getEndCap(), bs.getLineJoin(), bs.getMiterLimit(), bs.getDashArray(), bs.getDashPhase()); } throw new UnsupportedOperationException("The Stroke type '" + s.getClass().getName() + "' is not supported"); }
private Stroke transformStroke(Stroke stroke) { if (!(stroke instanceof BasicStroke)) return stroke; BasicStroke st = (BasicStroke)stroke; float scale = (float)Math.sqrt(Math.abs(transform.getDeterminant())); float dash[] = st.getDashArray(); if (dash != null) { for (int k = 0; k < dash.length; ++k) dash[k] *= scale; } return new BasicStroke(st.getLineWidth() * scale, st.getEndCap(), st.getLineJoin(), st.getMiterLimit(), dash, st.getDashPhase() * scale); }
private Stroke transformStroke(Stroke stroke) { if (!(stroke instanceof BasicStroke)) return stroke; BasicStroke st = (BasicStroke)stroke; float scale = (float)Math.sqrt(Math.abs(transform.getDeterminant())); float[] dash = st.getDashArray(); if (dash != null) { for (int k = 0; k < dash.length; ++k) dash[k] *= scale; } return new BasicStroke(st.getLineWidth() * scale, st.getEndCap(), st.getLineJoin(), st.getMiterLimit(), dash, st.getDashPhase() * scale); }
private Stroke transformStroke(Stroke stroke) { if (!(stroke instanceof BasicStroke)) return stroke; BasicStroke st = (BasicStroke)stroke; float scale = (float)Math.sqrt(Math.abs(_transform.getDeterminant())); float dash[] = st.getDashArray(); if (dash != null) { for (int k = 0; k < dash.length; ++k) dash[k] *= scale; } return new BasicStroke(st.getLineWidth() * scale, st.getEndCap(), st.getLineJoin(), st.getMiterLimit(), dash, st.getDashPhase() * scale); }
private Stroke transformStroke(Stroke stroke) { if (!(stroke instanceof BasicStroke)) return stroke; BasicStroke st = (BasicStroke) stroke; float scale = (float) Math.sqrt(Math.abs(_transform.getDeterminant())); float dash[] = st.getDashArray(); if (dash != null) { for (int k = 0; k < dash.length; ++k) dash[k] *= scale; } return new BasicStroke(st.getLineWidth() * scale, st.getEndCap(), st.getLineJoin(), st.getMiterLimit(), dash, st.getDashPhase() * scale); }
private Stroke transformStroke(Stroke stroke) { if (!(stroke instanceof BasicStroke)) return stroke; BasicStroke st = (BasicStroke) stroke; float scale = (float) Math.sqrt(Math.abs(_transform.getDeterminant())); float dash[] = st.getDashArray(); if (dash != null) { for (int k = 0; k < dash.length; ++k) dash[k] *= scale; } return new BasicStroke(st.getLineWidth() * scale, st.getEndCap(), st.getLineJoin(), st.getMiterLimit(), dash, st.getDashPhase() * scale); }
private Stroke transformStroke(Stroke stroke) { if (!(stroke instanceof BasicStroke)) return stroke; BasicStroke st = (BasicStroke)stroke; float scale = (float)Math.sqrt(Math.abs(_transform.getDeterminant())); float dash[] = st.getDashArray(); if (dash != null) { for (int k = 0; k < dash.length; ++k) dash[k] *= scale; } return new BasicStroke(st.getLineWidth() * scale, st.getEndCap(), st.getLineJoin(), st.getMiterLimit(), dash, st.getDashPhase() * scale); }
private Stroke transformStroke(Stroke stroke) { if (!(stroke instanceof BasicStroke)) return stroke; BasicStroke st = (BasicStroke)stroke; float scale = (float)Math.sqrt(Math.abs(transform.getDeterminant())); float dash[] = st.getDashArray(); if (dash != null) { for (int k = 0; k < dash.length; ++k) dash[k] *= scale; } return new BasicStroke(st.getLineWidth() * scale, st.getEndCap(), st.getLineJoin(), st.getMiterLimit(), dash, st.getDashPhase() * scale); }
static BasicStroke resizedBasicStroke(BasicStroke a, float multFactorSize) { if (multFactorSize == 1) return a; return new BasicStroke(a.getLineWidth() * multFactorSize, a.getEndCap(), a.getLineJoin(), a.getMiterLimit(), a.getDashArray(), a.getDashPhase()); } }
@Override public void writeExternal(ObjectOutput out) throws IOException { out.writeFloat(stroke.getLineWidth()); out.writeInt(stroke.getEndCap()); out.writeInt(stroke.getLineJoin()); out.writeFloat(stroke.getMiterLimit()); out.writeBoolean(stroke.getDashArray() != null); if (stroke.getDashArray() != null) { out.writeObject(stroke.getDashArray()); } out.writeFloat(stroke.getDashPhase()); }
protected BasicStroke getScaledStroke() { if (ic==null) return stroke; double mag = ic.getMagnification(); if (mag!=1.0) { float width = (float)(stroke.getLineWidth()*mag); //return new BasicStroke(width, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL); return new BasicStroke(width, stroke.getEndCap(), stroke.getLineJoin(), stroke.getMiterLimit(), stroke.getDashArray(), stroke.getDashPhase()); } else return stroke; }
public void changelineThickness(float width) { if (!fixedLineWidth && stroke instanceof BasicStroke) { BasicStroke s = (BasicStroke) stroke; if (MathUtil.isDifferent(s.getLineWidth(), width)) { stroke = new BasicStroke(width, s.getEndCap(), s.getLineJoin(), s.getMiterLimit(), s.getDashArray(), s.getDashPhase()); } } }