Merge "Omaha #3422 Replace drawFilledCircle and drawArc calls" into omaha_14.4.1
Former-commit-id: eac41695224c18aa566e4b1fdcbaf48647d93fdf
This commit is contained in:
commit
415c9e73fd
2 changed files with 28 additions and 32 deletions
|
@ -65,7 +65,7 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* Oct 13, 2009 2307 dhladky Initial creation
|
||||
* Apr 22, 2013 1926 njensen Faster rendering
|
||||
* May 09, 2014 3145 mpduff Add getter for font so it can be disposed, javadoc fix
|
||||
*
|
||||
* Jul 22, 2014 3422 mapeters Updated deprecated drawArc() call.
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -358,49 +358,40 @@ public class ScanDrawer {
|
|||
wLeftX = center[0] - (size);
|
||||
topY = center[1] - (size);
|
||||
bottomY = center[1] + (size);
|
||||
|
||||
DrawableCircle circle = new DrawableCircle();
|
||||
circle.setCoordinates(center[0], center[1]);
|
||||
circle.radius = size;
|
||||
circle.basics.color = getResourceColor();
|
||||
|
||||
if (mesoType == 0) {
|
||||
if (isExt) {
|
||||
// draw a broken circle
|
||||
aTarget.drawArc(center[0], center[1], 0.0, size,
|
||||
getResourceColor(), outlineWidth * 4, 0, 360,
|
||||
LineStyle.DASHED, true);
|
||||
} else {
|
||||
DrawableCircle circle = new DrawableCircle();
|
||||
circle.setCoordinates(center[0], center[1], 0.0);
|
||||
circle.basics.color = getResourceColor();
|
||||
circle.radius = size;
|
||||
circle.lineWidth = outlineWidth * 4;
|
||||
circle.filled = false;
|
||||
circle.lineStyle = LineStyle.DASHED;
|
||||
aTarget.drawCircle(circle);
|
||||
} else {
|
||||
circle.lineWidth = outlineWidth * 4;
|
||||
aTarget.drawCircle(circle);
|
||||
}
|
||||
} else if (mesoType == 2) {
|
||||
if (isExt) {
|
||||
// draw a broken circle
|
||||
aTarget.drawArc(center[0], center[1], 0.0, size,
|
||||
getResourceColor(), outlineWidth, 0, 360,
|
||||
LineStyle.DASHED, true);
|
||||
} else {
|
||||
DrawableCircle circle = new DrawableCircle();
|
||||
circle.setCoordinates(center[0], center[1], 0.0);
|
||||
circle.basics.color = getResourceColor();
|
||||
circle.radius = size;
|
||||
circle.lineWidth = outlineWidth;
|
||||
circle.filled = false;
|
||||
circle.lineStyle = LineStyle.DASHED;
|
||||
aTarget.drawCircle(circle);
|
||||
} else {
|
||||
circle.lineWidth = outlineWidth;
|
||||
aTarget.drawCircle(circle);
|
||||
}
|
||||
} else if (mesoType == 1) {
|
||||
if (isExt) {
|
||||
// draw a broken circle
|
||||
aTarget.drawArc(center[0], center[1], 0.0, size,
|
||||
getResourceColor(), outlineWidth * 4, 0, 360,
|
||||
LineStyle.DASHED, true);
|
||||
} else {
|
||||
DrawableCircle circle = new DrawableCircle();
|
||||
circle.setCoordinates(center[0], center[1], 0.0);
|
||||
circle.basics.color = getResourceColor();
|
||||
circle.radius = size;
|
||||
// draw a broken circle
|
||||
circle.lineWidth = outlineWidth * 4;
|
||||
circle.lineStyle = LineStyle.DASHED;
|
||||
aTarget.drawCircle(circle);
|
||||
} else {
|
||||
circle.lineWidth = outlineWidth * 4;
|
||||
circle.filled = false;
|
||||
aTarget.drawCircle(circle);
|
||||
}
|
||||
// top spike
|
||||
|
|
|
@ -21,6 +21,7 @@ package com.raytheon.viz.hydrocommon.resource;
|
|||
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
|
||||
import com.raytheon.uf.viz.core.DrawableCircle;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
|
@ -40,7 +41,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 22, 2009 snaples Initial creation
|
||||
*
|
||||
* Jul 22, 2014 #3422 mapeters Updated deprecated drawFilledCircle() call.
|
||||
* </pre>
|
||||
*
|
||||
* @author snaples
|
||||
|
@ -110,8 +111,12 @@ public abstract class HydroPointResource <T extends HydroPointResourceData<?>> e
|
|||
target.drawShadedRect(paintProps.getView().getExtent(), color,
|
||||
1.0, null);
|
||||
} else if (getStyle() == Style.CIRCLE) {
|
||||
target.drawFilledCircle(pixels[0], pixels[1], 0.0,
|
||||
CIRCLE_RADIUS, color);
|
||||
DrawableCircle circle = new DrawableCircle();
|
||||
circle.setCoordinates(pixels[0], pixels[1]);
|
||||
circle.radius = (double)CIRCLE_RADIUS;
|
||||
circle.basics.color = color;
|
||||
circle.filled = true;
|
||||
target.drawCircle(circle);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue