767768769770771772773774775776777
// necessary to switch temporarily the foreground and background // colours switchColors(); this.gc.fillPath(path); switchColors(); path.dispose(); } /** * Fill a rectangle area on the swt graphic composite. * The <code>fillRectangle</code> method of the <code>GC</code>
429430431432433434435436437438439
* @param s the shape for the clip. */ public void clip(Shape s) { Path path = toSwtPath(s); this.gc.setClipping(path); path.dispose(); } /** * Returns the clip bounds. *
477478479480481482483484485486487
if (clip == null) { return; } Path clipPath = toSwtPath(clip); this.gc.setClipping(clipPath); clipPath.dispose(); } /** * Sets the clip region to the specified rectangle. *
617618619620621622623624625626627
* @see #fill(Shape) */ public void draw(Shape shape) { Path path = toSwtPath(shape); this.gc.drawPath(path); path.dispose(); } /** * Draws a line from (x1, y1) to (x2, y2) using the current stroke * and paint settings.
748749750751752753754755756757758
448449450451452453454455456457458
496497498499500501502503504505506
636637638639640641642643644645646
79808182838485868788
Path path = createPath(pathbounds, graphics); graphics.drawPath(path); // reset Graphics path.dispose(); graphics.setLineWidth(oldLineWidth); } }