public void buildTransformationImage() { Point max = transMeta.getMaximum(); Point thumb = getThumb( area, max ); offset = getOffset( thumb, area ); // First clear the image in the background color gc.setBackground( EColor.BACKGROUND ); gc.fillRectangle( 0, 0, area.x, area.y ); // If there is a shadow, we draw the transformation first with an alpha setting // if ( shadowSize > 0 ) { shadow = true; gc.setTransform( translationX, translationY, shadowSize, magnification ); gc.setAlpha( 20 ); drawTrans( thumb ); } // Draw the transformation onto the image // shadow = false; gc.setTransform( translationX, translationY, 0, magnification ); gc.setAlpha( 255 ); drawTrans( thumb ); gc.dispose(); }
public void drawJob() { Point max = jobMeta.getMaximum(); Point thumb = getThumb( area, max ); offset = getOffset( thumb, area ); gc.setBackground( EColor.BACKGROUND ); if ( hori != null ) { hori.setThumb( thumb.x ); } if ( vert != null ) { vert.setThumb( thumb.y ); } // If there is a shadow, we draw the transformation first with an alpha // setting // if ( shadowSize > 0 ) { gc.setAlpha( 20 ); gc.setTransform( translationX, translationY, shadowSize, magnification ); shadow = true; drawJobElements(); } // Draw the transformation onto the image // gc.setAlpha( 255 ); gc.setTransform( translationX, translationY, 0, magnification ); shadow = false; drawJobElements(); gc.dispose(); }
public Image getTransformationImage( Device device, int x, int y, float magnificationFactor ) { GCInterface gc = new SWTGC( device, new Point( x, y ), iconsize ); int gridSize = PropsUI.getInstance().isShowCanvasGridEnabled() ? PropsUI.getInstance().getCanvasGridSize() : 1; TransPainter transPainter = new TransPainter( gc, transMeta, new Point( x, y ), new SwtScrollBar( hori ), new SwtScrollBar( vert ), candidate, drop_candidate, selectionRegion, areaOwners, mouseOverSteps, PropsUI.getInstance().getIconSize(), PropsUI.getInstance().getLineWidth(), gridSize, PropsUI.getInstance().getShadowSize(), PropsUI.getInstance() .isAntiAliasingEnabled(), PropsUI.getInstance().getNoteFont().getName(), PropsUI.getInstance() .getNoteFont().getHeight(), trans, PropsUI.getInstance().isIndicateSlowTransStepsEnabled() ); transPainter.setMagnification( magnificationFactor ); transPainter.setStepLogMap( stepLogMap ); transPainter.setStartHopStep( startHopStep ); transPainter.setEndHopLocation( endHopLocation ); transPainter.setNoInputStep( noInputStep ); transPainter.setEndHopStep( endHopStep ); transPainter.setCandidateHopType( candidateHopType ); transPainter.setStartErrorHopStep( startErrorHopStep ); transPainter.setShowTargetStreamsStep( showTargetStreamsStep ); transPainter.buildTransformationImage(); Image img = (Image) gc.getImage(); gc.dispose(); return img; }