Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Transform.dispose()


//        gc.translate(
//                -bounds.x * tsize.x,
//                -bounds.y * tsize.y);
        gc.setTransform(null);
        transform.dispose();
    }

  protected void drawAnchors(GC gc, double ox, double oy, int objWidth,
      int objHeight) {

View Full Code Here


                      Transform transform = new Transform(getDisplay());
                        transform.translate(x + (tsize.x - 13), y+1);
                    gc.setTransform(transform);
                        gc.drawPolygon(Converter.getPolygonArray(propPoly));
                        gc.setTransform(null);
                        transform.dispose();
                    }
                }
                catch (Exception e) {
                    System.out.print("Exception\n");
                }
View Full Code Here

        path.addString("SWT", 0, 0, font);
        gc.setBackground(display.getSystemColor(SWT.COLOR_GREEN));
        gc.setForeground(display.getSystemColor(SWT.COLOR_BLUE));
        gc.fillPath(path);
        gc.drawPath(path);
        tr.dispose();
        path.dispose();
      }
    });
    shell.setSize(shell.computeSize(rect.width / 2, rect.height / 2));
    shell.open();
View Full Code Here

            transform.translate(-(offsetX + image.getBounds().width / 2),
                -(offsetY + image.getBounds().height / 2));
            gc.setTransform(transform);
            gc.drawImage(image, offsetX, offsetY);
            gc.setTransform(oldTransform);
            transform.dispose();
            oldTransform.dispose();
          }
        }
      }
    }
View Full Code Here

                    event.gc.drawString(label, -labelExtend.x - 2, 2, true);
                    event.gc.drawString(info, -infoExtend.x - 2, 2 + labelExtend.y, true);
                }
                finally
                {
                    transform.dispose();
                }
            }

            event.gc.setForeground(oldForeground);
            event.gc.setBackground(oldBackground);
View Full Code Here

     */
    public AffineTransform getTransform() {
        Transform swtTransform = new Transform(this.gc.getDevice());
        this.gc.getTransform(swtTransform);
        AffineTransform awtTransform = toAwtTransform(swtTransform);
        swtTransform.dispose();
        return awtTransform;
    }

    /* (non-Javadoc)
     * @see java.awt.Graphics2D#setTransform(java.awt.geom.AffineTransform)
View Full Code Here

        Transform swtTransform = new Transform(this.gc.getDevice());
        this.gc.getTransform(swtTransform);
        Transform swtMatrix = toSwtTransform(Tx);
        swtTransform.multiply(swtMatrix);
        this.gc.setTransform(swtTransform);
        swtMatrix.dispose();
        swtTransform.dispose();
    }

    /* (non-Javadoc)
     * @see java.awt.Graphics2D#translate(int, int)
View Full Code Here

    public void translate(int x, int y) {
        Transform swtTransform = new Transform(this.gc.getDevice());
        this.gc.getTransform(swtTransform);
        swtTransform.translate(x, y);
        this.gc.setTransform(swtTransform);
        swtTransform.dispose();
    }

    /* (non-Javadoc)
     * @see java.awt.Graphics2D#translate(double, double)
     */
 
View Full Code Here

    public void rotate(double theta) {
        Transform swtTransform = new Transform(this.gc.getDevice());
        this.gc.getTransform(swtTransform);
        swtTransform.rotate( (float) (theta * 180 / Math.PI));
        this.gc.setTransform(swtTransform);
        swtTransform.dispose();
    }

    /* (non-Javadoc)
     * @see java.awt.Graphics2D#rotate(double, double, double)
     */
 
View Full Code Here

    public void scale(double scaleX, double scaleY) {
        Transform swtTransform = new Transform(this.gc.getDevice());
        this.gc.getTransform(swtTransform);
        swtTransform.scale((float) scaleX, (float) scaleY);
        this.gc.setTransform(swtTransform);
        swtTransform.dispose();
    }

    /* (non-Javadoc)
     * @see java.awt.Graphics2D#shear(double, double)
     */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.