Package org.eclipse.swt.graphics

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


                String s = activeTopBar.getShortTitle();
                Point size = e.gc.textExtent(s);
                e.gc.drawText(s, -size.x, 0, true);
                //e.gc.drawText(s, 0,0, true);
                transform.dispose();
              } catch (Exception ex) {
                // setTransform can trhow a ERROR_NO_GRAPHICS_LIBRARY error
                // no use trying to draw.. it would look weird
              }
              //font.dispose();
View Full Code Here


                    p.addString(binLabels[i], -c.getBounds().height + 5,
                            x1 + (int) (0.5 * width) - 10, f);
                    g.fillPath(p);
                    tr.rotate(90.0f);
                    g.setTransform(tr);
                    tr.dispose();
                    p.dispose();
                }
                f.dispose();
            }
        }
View Full Code Here

                    p.addString(binLabels[i], -c.getBounds().height + 5,
                            x1 + (int) (0.5 * width) - 10, f);
                    g.fillPath(p);
                    tr.rotate(90.0f);
                    g.setTransform(tr);
                    tr.dispose();
                    p.dispose();
                }
                f.dispose();
            }
        }
View Full Code Here

            t.translate(offsetX, offsetY);
            gc.setTransform(t);
           
            this.paintMap(mapValues, gc);
           
            t.dispose();
            waterColor.dispose();
        }
        catch (Throwable ex) {
            ex.printStackTrace();
        }
View Full Code Here

        gc.setTransform(t);
        gc.fillPolygon(polygon);
        gc.drawPolygon(polygon);
        gc.drawText(name, PADDING_X, PADDING_Y);
        gc.setTransform(save);
        t.dispose();
        save.dispose();

        // TODO learn from class RenameInformationPopup how to open a custom popup, dream on...

    }
View Full Code Here

        gc.fillPath(path);
        gc.drawPath(path);
       
        // restore old transform
        gc.setTransform(save);
        t.dispose();
        save.dispose();
    }

    @Override
    public void paintBefore(MapValues map, GC gc) {
View Full Code Here

      final Transform transform = new Transform(g2.getDevice());
      transform.translate(rotateX, rotateY);
      transform.rotate((float) (-angle * 180 / Math.PI));
      transform.translate(-rotateX, -rotateY);
      g2.setTransform(transform);
      transform.dispose();
    }

    g2.drawString(text, (int) textX, (int) textY, true);

    if (angle != 0.0) {
View Full Code Here

                  gc.setTransform(transform);
                      gc.drawString(string, xOffset + (i * fontMetrics.getHeight()), 2, true);
                    }
                }
                if (transform != null)
                  transform.dispose();
            }
        });
    }

    /* (non-Javadoc)
 
View Full Code Here

                    y = (rect.height - 16) / 2;
                    Transform swtTransform = new Transform(e.gc.getDevice());
                    e.gc.getTransform(swtTransform);
                    swtTransform.translate(x, y);
                    e.gc.setTransform(swtTransform);
                    swtTransform.dispose();
                    e.gc.setBackground(getDisplay().getSystemColor(
                            SWT.COLOR_BLACK));
                    e.gc.setLineWidth((int) stroke.getLineWidth());
                    e.gc.drawLine(10, 8, 90, 8);
                }
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;
    }

    /**
     * Sets the current transform.
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.