----------------------------------------------------------------------- Private methods 
Trace the specified path on the given canvas context.

@param g
canvas context
@param coords
a sequence of coordinates to trace
335143
function(g, coords) {
        if (!coords || !coords.length)
            return;
        g.moveTo(coords[0][0], coords[0][1]);
        for (var i = 1; i < coords.length; i++) {
            g.lineTo(coords[i][0], coords[i][1]);
        }
    }
932571
public void setContextPath(String _contextPath){
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {
            logger.logp(Level.FINE, CLASS_NAME,"setContextPath", "contextPath -> "+ _contextPath +" ,this -> " + this);
        }
        this._contextPath = _contextPath;
    }
65149
public void fillPolygon(double[]... coord) {
        int[][] c = new int[coord.length][2];
        for (int i = 0; i < coord.length; i++) {
            c[i] = projection.screenProjection(coord[i]);
        }

        int[] x = new int[c.length];
        for (int i = 0; i < c.length; i++) {
            x[i] = c[i][0];
        }
        int[] y = new int[c.length];
        for (int i = 0; i < c.length; i++) {
            y[i] = c[i][1];
        }

        g2d.fillPolygon(x, y, c.length);
    }
575829
public void paint (Graphics2D gfx)
    {
        // if we're rendering footprints, paint that
        boolean footpaint = _fprintDebug.getValue();
        if (footpaint) {
            gfx.setColor(Color.black);
            gfx.draw(_footprint);

            if (_hideObjects.getValue()) {
                // We're in footprints but no objects mode, so let's also fill it in so we can
                // see things better/tell if we have overlapping ones
                Composite ocomp = gfx.getComposite();
                gfx.setComposite(ALPHA_WARN);
                gfx.fill(_footprint);
                gfx.setComposite(ocomp);
            }
        }

        if (_hideObjects.getValue()) {
            return;
        }

        // if we have a warning, render an alpha'd red rectangle over our bounds
        if (_warning) {
            Composite ocomp = gfx.getComposite();
            gfx.setComposite(ALPHA_WARN);
            gfx.fill(bounds);
            gfx.setComposite(ocomp);
        }

        // paint our tile
        tile.paint(gfx, bounds.x, bounds.y);

        // and possibly paint the object's spot
        if (footpaint && _sspot != null) {
            // translate the origin to center on the portal
            gfx.translate(_sspot.x, _sspot.y);

            // rotate to reflect the spot orientation
            double rot = (Math.PI / 4.0f) * tile.getSpotOrient();
            gfx.rotate(rot);

            // draw the spot triangle
            gfx.setColor(Color.green);
            gfx.fill(_spotTri);

            // outline the triangle in black
            gfx.setColor(Color.black);
            gfx.draw(_spotTri);

            // restore the original transform
            gfx.rotate(-rot);
            gfx.translate(-_sspot.x, -_sspot.y);
        }
    }
859017
public static void contextPath(String context) {
        if (S.blank(context)) ctx = "";
        else {
            E.illegalArgumentIf(!context.startsWith("/"), "context path should start with \"/\"");
            if (context.endsWith("/")) {
                ctx = S.str(context).beforeLast("/").toString();
            }
        }
    }
1159383
function Canvas(context) {
        this.context = context;
        this.stateStack = [];
        this.color = Graphics.Color.BLACK;
        this.fillColor = Graphics.Color.WHITE;
        this.fontColor = Graphics.Color.BLACK;
        this.font = new Graphics.Font("Arial", 12, Graphics.FS_NORMAL);
        this.lineWidth = 1;
        this.alpha = 1.0;
        this.origin = new Graphics.Point(0.0, 0.0);
        this.zoomFactor = new Graphics.ZoomFactor(1, 1);
        this.gridFactor = new Graphics.GridFactor(1, 1);
        this.coordTransformApplied = true;
    }
1364435
function drawLinearTickStroke(context, sX, sY, eX, eY) {
    context.beginPath();
    context.moveTo(sX, sY);
    context.lineTo(eX, eY);
    context.stroke();
    context.closePath();
}
1230643
@Override
    protected void trace(String msg, Object... args) {
        msg = S.fmt(msg, args);
        if (once) {
            msg = S.builder("[once]").append(msg).toString();
        }
        super.trace(msg);
    }
459225
protected void paint(SeaGlassContext context, Graphics g) {
        JSeparator separator = (JSeparator) context.getComponent();

        context.getPainter().paintSeparatorForeground(context, g, 0, 0, separator.getWidth(), separator.getHeight(),
                                                      separator.getOrientation());
    }
1102077
public void setCurve (double[] coords, int offset) {
        setCurve(coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3],
                 coords[offset + 4], coords[offset + 5], coords[offset + 6], coords[offset + 7]);
    }
388675
@Override
    protected void paintComponent(java.awt.Graphics g) {
        if (!isInitialized()) {
            return;
        }

        final java.awt.Graphics2D G2 = (java.awt.Graphics2D) g.create();

        CENTER.setLocation(getGaugeBounds().getCenterX(), getGaugeBounds().getCenterX());

        G2.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING, java.awt.RenderingHints.VALUE_ANTIALIAS_ON);
        G2.setRenderingHint(java.awt.RenderingHints.KEY_RENDERING, java.awt.RenderingHints.VALUE_RENDER_QUALITY);
        G2.setRenderingHint(java.awt.RenderingHints.KEY_STROKE_CONTROL, java.awt.RenderingHints.VALUE_STROKE_NORMALIZE);
        G2.setRenderingHint(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON);

        // Translate the coordinate system related to the insets
        G2.translate(getFramelessOffset().getX(), getFramelessOffset().getY());

        final java.awt.geom.AffineTransform OLD_TRANSFORM = G2.getTransform();
        final java.awt.Shape OLD_CLIP = G2.getClip();

        // Draw the horizon
        G2.setClip(CLIP);

        // Rotate around roll
        G2.rotate(-Math.toRadians(roll), CENTER.getX(), CENTER.getY());

        // Translate about dive
        G2.translate(0, -(pitch * pitchPixel) - getFramelessOffset().getY());

        // Draw horizon
        G2.drawImage(horizonImage, 0, (int) ((getHeight() - horizonImage.getHeight()) / 2.0), null);

        // Draw the scale and angle indicator
        G2.translate(-getFramelessOffset().getX(), (pitch * pitchPixel) + getFramelessOffset().getY());
        G2.drawImage(horizonForegroundImage, (int) (getWidth() * 0.5 - horizonForegroundImage.getWidth() / 2.0), (int) (getWidth() * 0.10747663551401869), null);

        G2.setTransform(OLD_TRANSFORM);
        G2.setClip(OLD_CLIP);

        // Draw combined background image
        G2.drawImage(bImage, 0, 0, null);

        // Draw combined foreground image
        G2.drawImage(fImage, 0, 0, null);

        if (!isEnabled()) {
            G2.drawImage(disabledImage, 0, 0, null);
        }

        G2.dispose();
    }
958110
protected void paintValues(Graphics g, boolean paintLines) {
		Point valueLocation;
		Point lastLocation = null;
		for (int i = 0; i < getValueCount(); i++) {
			valueLocation = getPointFor(i);
			GraphicUtils.fillCircle(g, valueLocation, getPointDiameter());
			if(paintLines && lastLocation!=null){
				g.drawLine(lastLocation.x, lastLocation.y, valueLocation.x, valueLocation.y);
			}
			lastLocation = valueLocation;
		}
	}
353520
public void setRoot(int context, Object environment)
  {
    super.setRoot(context, environment);
    m_traverser = m_cdtm.getAxisTraverser(m_axis);
    
  }
535763
public void drawBoxes(Graphics g){
		if ( fragmentPairs == null )
			return;

		g.setColor(Color.yellow);


		for (int i = 0; i < fragmentPairs.length; i++) {
			FragmentPair fp =fragmentPairs[i];
			int xp = fp.getPos1();
			int yp = fp.getPos2();

			int width = Math.round(scale);

			g.drawRect(Math.round(xp*scale),Math.round(yp*scale),width, width);

		}
	}
789615
protected void paint(SynthContext context, Graphics g) {
        JToolTip tip = (JToolTip) context.getComponent();

        Insets insets = tip.getInsets();
        View v = (View) tip.getClientProperty(BasicHTML.propertyKey);
        if (v != null) {
            Rectangle paintTextR = new Rectangle(insets.left, insets.top, tip.getWidth() - (insets.left + insets.right), tip.getHeight()
                    - (insets.top + insets.bottom));
            v.paint(g, paintTextR);
        } else {
            g.setColor(context.getStyle().getColor(context, ColorType.TEXT_FOREGROUND));
            g.setFont(style.getFont(context));
            context.getStyle().getGraphicsUtils(context).paintText(context, g, tip.getTipText(), insets.left, insets.top, -1);
        }
    }
1072353
public void addSubPath(Coordinate[] coordinates, boolean closed) {
		subPaths.add(new SubPath(coordinates, closed));
		updateCoordinates();

	}
1166320
@Override
    public void draw(Canvas canvas) {
        drawSpacings(canvas);
        drawBaselineGrid(canvas);
        drawKeylines(canvas);
    }