@Test (groups = {"11-06-u-roi"}, dependsOnMethods = {"testROI2AndUnion"}) public void testShape8() { Assert.assertNotNull(union2); shape8 = union2.getShape(2); Assert.assertEquals(Line.class.getName(), shape8.getClass().getName()); Line line8 = (Line) shape8; Assert.assertEquals(ref.ROI2Shape8Stroke, line8.getStrokeColor()); Assert.assertEquals(ref.ROI2Shape8StrokeWidth, line8.getStrokeWidth()); Assert.assertEquals(ref.ROI2Shape8MarkerEnd, line8.getMarkerEnd()); Assert.assertEquals(ref.ROI2Shape8LineX1, line8.getX1()); Assert.assertEquals(ref.ROI2Shape8LineY1, line8.getY1()); Assert.assertEquals(ref.ROI2Shape8LineX2, line8.getX2()); Assert.assertEquals(ref.ROI2Shape8LineY2, line8.getY2()); }
public Color getLineFillColor(int ROIIndex, int shapeIndex) { // Parents: None // FillColor is not a reference return ((Line)root.getROI(ROIIndex).getUnion().getShape(shapeIndex)).getFillColor(); }
public Marker getLineMarkerStart(int ROIIndex, int shapeIndex) { // Parents: None // MarkerStart is not a reference return ((Line)root.getROI(ROIIndex).getUnion().getShape(shapeIndex)).getMarkerStart(); }
public class LineMoveModifier extends MoveModifier{ public LineMoveModifier(float pDuration, float pFromX, float pToX, float pFromY, float pToY) { super(pDuration, pFromX, pToX, pFromY, pToY); // TODO Auto-generated constructor stub } public LineMoveModifier(final float pDuration, final float pFromX, final float pToX, final float pFromY, final float pToY, final IEntityModifierListener pEntityModifierListener, final IEaseFunction pEaseFunction) { super(pDuration, pFromX, pToX, pFromY, pToY, pEntityModifierListener, pEaseFunction); } @Override protected void onSetValues(final IEntity pEntity, final float pPercentageDone, final float pX, final float pY) { Line x = (Line)pEntity; x.setPosition(x.getX1(), x.getY1(), pX, pY); }
int x1 = line.getX1().intValue(); int x2 = line.getX2().intValue(); int y1 = line.getY1().intValue(); int y2 = line.getY2().intValue(); roi = new Line(x1, y1, x2, y2); if (line.getStrokeColor() != null) { ome.xml.model.primitives.Color StrokeColor = line.getStrokeColor(); sc = new Color(StrokeColor.getRed(), StrokeColor.getGreen(), StrokeColor.getBlue(), StrokeColor.getAlpha()); if (line.getFillColor() != null) { ome.xml.model.primitives.Color FillColor = line.getFillColor(); fc = new Color(FillColor.getRed(), FillColor.getGreen(), FillColor.getBlue(),FillColor.getAlpha()); if (line.getStrokeWidth() != null) { sw = line.getStrokeWidth().value().floatValue();
public void setLineY1(Double y1, int ROIIndex, int shapeIndex) { // Parents: None // Y1 is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Line()); } Line o3 = (Line) o2.getShape(shapeIndex); o3.setY1(y1); }
public void setLineX2(Double x2, int ROIIndex, int shapeIndex) { // Parents: None // X2 is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Line()); } Line o3 = (Line) o2.getShape(shapeIndex); o3.setX2(x2); }
public void setLineX1(Double x1, int ROIIndex, int shapeIndex) { // Parents: None // X1 is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Line()); } Line o3 = (Line) o2.getShape(shapeIndex); o3.setX1(x1); }
public void setLineY2(Double y2, int ROIIndex, int shapeIndex) { // Parents: None // Y2 is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Line()); } Line o3 = (Line) o2.getShape(shapeIndex); o3.setY2(y2); }
public Double getLineY1(int ROIIndex, int shapeIndex) { // Parents: None // Y1 is not a reference return ((Line)root.getROI(ROIIndex).getUnion().getShape(shapeIndex)).getY1(); }
public Double getLineY2(int ROIIndex, int shapeIndex) { // Parents: None // Y2 is not a reference return ((Line)root.getROI(ROIIndex).getUnion().getShape(shapeIndex)).getY2(); }
public Double getLineX1(int ROIIndex, int shapeIndex) { // Parents: None // X1 is not a reference return ((Line)root.getROI(ROIIndex).getUnion().getShape(shapeIndex)).getX1(); }
public Double getLineX2(int ROIIndex, int shapeIndex) { // Parents: None // X2 is not a reference return ((Line)root.getROI(ROIIndex).getUnion().getShape(shapeIndex)).getX2(); }
public void setLineFontFamily(FontFamily fontFamily, int ROIIndex, int shapeIndex) { // Parents: None // FontFamily is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Line()); } Line o3 = (Line) o2.getShape(shapeIndex); o3.setFontFamily(fontFamily); }
public void setLineFontSize(Length fontSize, int ROIIndex, int shapeIndex) { // Parents: None // FontSize is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Line()); } Line o3 = (Line) o2.getShape(shapeIndex); o3.setFontSize(fontSize); }
public void setLineLocked(Boolean locked, int ROIIndex, int shapeIndex) { // Parents: None // Locked is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Line()); } Line o3 = (Line) o2.getShape(shapeIndex); o3.setLocked(locked); }
public void setLineStrokeColor(Color strokeColor, int ROIIndex, int shapeIndex) { // Parents: None // StrokeColor is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Line()); } Line o3 = (Line) o2.getShape(shapeIndex); o3.setStrokeColor(strokeColor); }
public void setLineStrokeWidth(Length strokeWidth, int ROIIndex, int shapeIndex) { // Parents: None // StrokeWidth is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); if (o1.getUnion() == null) { o1.setUnion(new Union()); } Union o2 = o1.getUnion(); if (o2.sizeOfShapeList() == shapeIndex) { o2.addShape(new Line()); } Line o3 = (Line) o2.getShape(shapeIndex); o3.setStrokeWidth(strokeWidth); }