use of org.csstudio.swt.widgets.figures.IntensityGraphFigure.GraphArea in project yamcs-studio by yamcs.
the class ROIFigure method getGeoBoundsFromROI.
private PrecisionRectangle getGeoBoundsFromROI(Rectangle roiDataBounds) {
PrecisionPoint lt = ((GraphArea) getParent()).getGeoLocation(roiDataBounds.preciseX() - intensityGraphFigure.getCropLeft(), roiDataBounds.preciseY() - intensityGraphFigure.getCropTop());
PrecisionPoint rb = ((GraphArea) getParent()).getGeoLocation(roiDataBounds.preciseX() + roiDataBounds.preciseWidth() - intensityGraphFigure.getCropLeft(), roiDataBounds.preciseY() + roiDataBounds.preciseHeight() - intensityGraphFigure.getCropTop());
return new PrecisionRectangle(lt.preciseX() - getBounds().x, lt.preciseY() - getBounds().y, rb.preciseX() - lt.preciseX(), rb.preciseY() - lt.preciseY());
}
use of org.csstudio.swt.widgets.figures.IntensityGraphFigure.GraphArea in project yamcs-studio by yamcs.
the class ROIFigure method getROIFromGeoBounds.
private Rectangle getROIFromGeoBounds(PrecisionRectangle roiBounds) {
PrecisionPoint lt = ((GraphArea) getParent()).getDataLocation(roiBounds.preciseX(), roiBounds.preciseY());
PrecisionPoint rb = ((GraphArea) getParent()).getDataLocation(roiBounds.preciseX() + roiBounds.preciseWidth(), roiBounds.preciseY() + roiBounds.preciseHeight());
return new Rectangle((int) Math.round(lt.preciseX()) + intensityGraphFigure.getCropLeft(), (int) Math.round(lt.preciseY()) + intensityGraphFigure.getCropTop(), (int) Math.ceil(rb.preciseX() - lt.preciseX()), (int) Math.ceil(rb.preciseY() - lt.preciseY()));
}
Aggregations