/** * displays the tag using the renderer * * @param renderer EMFRenderer storing the drawing session data * @param closePath if true the path is closed and filled */ protected void render(EMFRenderer renderer, boolean closePath) { // create a GeneralPath containing GeneralPathes GeneralPath path = new GeneralPath(renderer.getWindingRule()); // iterate the polgons Point p; for (int polygon = 0; polygon < numberOfPoints.length; polygon++) { // create a new member of path GeneralPath gp = new GeneralPath(renderer.getWindingRule()); for (int point = 0; point < numberOfPoints[polygon]; point++) { // add a point to gp p = points[polygon][point]; if (point > 0) { gp.lineTo((float) p.getX(), (float) p.getY()); } else { gp.moveTo((float) p.getX(), (float) p.getY()); } } // close the member, add it to path if (closePath) { gp.closePath(); } path.append(gp, false); } // draw the complete path if (closePath) { renderer.fillAndDrawOrAppend(path); } else { renderer.drawOrAppend(path); } }
/** * displays the tag using the renderer * * @param renderer EMFRenderer storing the drawing session data */ public void render(EMFRenderer renderer) { GeneralPath currentPath = renderer.getPath(); // fills the current path if (currentPath != null) { renderer.fillShape(currentPath); renderer.setPath(null); } }
/** * displays the tag using the renderer * * @param renderer EMFRenderer storing the drawing session data */ public void render(EMFRenderer renderer) { // The SetArcDirection sets the drawing direction to // be used for arc and rectangle functions. renderer.setArcDirection(direction); }
/** * displays the tag using the renderer * * @param renderer EMFRenderer storing the drawing session data */ public void render(EMFRenderer renderer) { renderer.closeFigure(); }
/** * displays the tag using the renderer * * @param renderer EMFRenderer storing the drawing session data */ public void render(EMFRenderer renderer) { // The IntersectClipRect function creates a new clipping // region from the intersection of the current clipping // region and the specified rectangle. renderer.clip(bounds); }
/** * displays the tag using the renderer * * @param renderer EMFRenderer storing the drawing session data */ public void render(EMFRenderer renderer) { // TODO: See if this ever happens. renderer.setFont(font); }
/** * displays the tag using the renderer * * @param renderer EMFRenderer storing the drawing session data */ public void render(EMFRenderer renderer) { // This function displays bitmaps that have transparent or semitransparent pixels. if (image != null) { renderer.drawImage(image, x, y, width, height); } }