Stroke the given me.Polygon on the screen
@name strokePolygon
@memberOf me.CanvasRenderer.prototype
@function
@param {me.Polygon} poly the shape to draw
501599
function (poly, fill) {
            var context = this.backBufferContext2D;

            if (context.globalAlpha < 1 / 255) {
                // Fast path: don't draw fully transparent
                return;
            }

            this.translate(poly.pos.x, poly.pos.y);
            context.beginPath();
            context.moveTo(poly.points[0].x, poly.points[0].y);
            var point;
            for (var i = 1; i < poly.points.length; i++) {
                point = poly.points[i];
                context.lineTo(point.x, point.y);
            }
            context.lineTo(poly.points[0].x, poly.points[0].y);
            context[fill === true ? "fill" : "stroke"]();
            context.closePath();
            this.translate(-poly.pos.x, -poly.pos.y);
        }
1057879
function(context, geometry, style, featureId, type) {
        var components = geometry.components;
        var len = components.length;
        context.beginPath();
        var start = this.getLocalXY(components[0]);
        var x = start[0];
        var y = start[1];
        if (!isNaN(x) && !isNaN(y)) {
            context.moveTo(start[0], start[1]);
            for (var i=1; i<len; ++i) {
                var pt = this.getLocalXY(components[i]);
                context.lineTo(pt[0], pt[1]);
            }
            if (type === "fill") {
                context.fill();
            } else {
                context.stroke();
            }
        }
    }
1248725
function(geometry, style, featureId) {
        if(style.graphic !== false) {
            if(style.externalGraphic) {
                this.drawExternalGraphic(geometry, style, featureId);
            } else if (style.graphicName && (style.graphicName != "circle")) {
                this.drawNamedSymbol(geometry, style, featureId);
            } else {
                var pt = this.getLocalXY(geometry);
                var p0 = pt[0];
                var p1 = pt[1];
                if(!isNaN(p0) && !isNaN(p1)) {
                    var twoPi = Math.PI*2;
                    var radius = style.pointRadius;
                    if(style.fill !== false) {
                        this.setCanvasStyle("fill", style);
                        this.canvas.beginPath();
                        this.canvas.arc(p0, p1, radius, 0, twoPi, true);
                        this.canvas.fill();
                        if (this.hitDetection) {
                            this.setHitContextStyle("fill", featureId, style);
                            this.hitContext.beginPath();
                            this.hitContext.arc(p0, p1, radius, 0, twoPi, true);
                            this.hitContext.fill();
                        }
                    }

                    if(style.stroke !== false) {
                        this.setCanvasStyle("stroke", style);
                        this.canvas.beginPath();
                        this.canvas.arc(p0, p1, radius, 0, twoPi, true);
                        this.canvas.stroke();
                        if (this.hitDetection) {
                            this.setHitContextStyle("stroke", featureId, style);
                            this.hitContext.beginPath();
                            this.hitContext.arc(p0, p1, radius, 0, twoPi, true);
                            this.hitContext.stroke();
                        }
                        this.setCanvasStyle("reset");
                    }
                }
            }
        }
    }
1361675
function drawStroke (stroke) {
            context.beginPath();
            for (var j = 0; j < stroke.points.length - 1; j++) {
                var start = normalizePoint(stroke.points[j]);
                var end = normalizePoint(stroke.points[j + 1]);

                context.moveTo(start.x, start.y);
                context.lineTo(end.x, end.y);
            }
            context.closePath();

            context.strokeStyle = stroke.color;
            context.lineWidth = normalizeLineSize(stroke.size);
            context.lineJoin = stroke.join;
            context.lineCap = stroke.cap;
            context.miterLimit = stroke.miterLimit;

            context.stroke();
        }
1358124
public void stroke(Canvas canvas, Align align, float x, float y) {
    float sy = y + bounds.y();
    for (TextLayout line : lines) {
      float sx = x + bounds.x() + align.getX(line.width(), textWidth());
      canvas.strokeText(line, sx, sy);
      sy += line.ascent() + line.descent() + line.leading();
    }
  }
637002
private void drawCircleUp(@NonNull Canvas canvas, float step, float radius) {
    canvas.drawCircle(
            xCoordinate + step,
            getMeasuredHeight() / 2,
            dotRadius + radius,
            startPaint
    );
  }
1239365
function(geometry, style, featureId) {
        style = OpenLayers.Util.applyDefaults({fill: false}, style);
        this.drawLinearRing(geometry, style, featureId);
    }
783018
private void render(SVG.Polygon obj)
   {
      debug("Polygon render");

      updateStyleForElement(state, obj);

      if (!display())
         return;
      if (!visible())
         return;
      if (!state.hasStroke && !state.hasFill)
         return;

      if (obj.transform != null)
         canvas.concat(obj.transform);

      int  numPoints = obj.points.length;
      if (numPoints < 2)
         return;

      Path  path = makePathAndBoundingBox(obj);
      updateParentBoundingBox(obj);

      checkForGradientsAndPatterns(obj);
      checkForClipPath(obj);
      
      boolean  compositing = pushLayer();

      if (state.hasFill)
         doFilledPath(obj, path);
      if (state.hasStroke)
         doStroke(path);

      renderMarkers(obj);

      if (compositing)
         popLayer(obj);
   }
464467
protected void stroke(ZoomableGraphicsContext gc, T element) {
		final double radius = element.getRadius();
		final double diameter = radius * radius;
		final double minx = element.getX() - radius;
		final double miny = element.getY() - radius;
		gc.strokeOval(minx, miny, diameter, diameter);
	}
612618
def draw(svg, coords, options={})
      # Check whether to use color from theme, or whether to use user defined colors from the area_colors array
      color_count = nil
      if @area_colors && @area_colors.size > 0
        area_color = @area_colors[0]
        color_count = 1
      else
        puts "Never Set Area Color"
        area_color = color
      end

      # Draw Bottom Level Polygons (Original Coords)
      draw_poly(svg, coords, area_color, options = {})

      # Draw Lower Area Polygons
      if @baselines
        # Get the Color of this Area
        puts "Drawing Baselines"
        @baselines.sort! {|x,y| y <=> x }
        @baselines.each do |baseline|
          if color_count
            area_color = area_colors[color_count]
            color_count = color_count + 1
            puts area_color.to_s
            if color_count >= area_colors.size
              color_count = 0
            end
          end

          lower_poly_coords = create_lower_polygon_coords(translate_number(baseline), coords, options)
          draw_poly(svg, lower_poly_coords, area_color, options = {})
        end
      end
    end
123770
private void paintForegroundPressed(Graphics2D g, int width, int height) {
        Shape s = decodeArrowPath(width, height);

        g.setPaint(pressedColor);
        g.fill(s);

    }
1043368
@Override
	public void draw(final Canvas canvas, final Projection pj) {

		final int size = this.mPoints.size();
		if (size < 2) {
			// nothing to paint
			return;
		}

		// precompute new points to the intermediate projection.
		while (this.mPointsPrecomputed < size) {
			final PointL pt = this.mPoints.get(this.mPointsPrecomputed);
			pj.toProjectedPixels(pt.x, pt.y, pt);

			this.mPointsPrecomputed++;
		}

		Point screenPoint0 = null; // points on screen
		Point screenPoint1;
		PointL projectedPoint0; // points from the points list
		PointL projectedPoint1;

		// clipping rectangle in the intermediate projection, to avoid performing projection.
		BoundingBox boundingBox = pj.getBoundingBox();
		PointL topLeft = pj.toProjectedPixels(boundingBox.getLatNorth(),
				boundingBox.getLonWest(), null);
		PointL bottomRight = pj.toProjectedPixels(boundingBox.getLatSouth(),
				boundingBox.getLonEast(), null);
		final RectL clipBounds = new RectL(topLeft.x, topLeft.y, bottomRight.x, bottomRight.y);

		mPath.rewind();
		projectedPoint0 = this.mPoints.get(size - 1);
		mLineBounds.set(projectedPoint0.x, projectedPoint0.y, projectedPoint0.x, projectedPoint0.y);

		final double powerDifference = pj.getProjectedPowerDifference();
		for (int i = size - 2; i >= 0; i--) {
			// compute next points
			projectedPoint1 = this.mPoints.get(i);
			mLineBounds.union(projectedPoint1.x, projectedPoint1.y);

			if (!RectL.intersects(clipBounds, mLineBounds)) {
				// skip this line, move to next point
				projectedPoint0 = projectedPoint1;
				screenPoint0 = null;
				continue;
			}

			// the starting point may be not calculated, because previous segment was out of clip
			// bounds
			if (screenPoint0 == null) {
				screenPoint0 = pj.getPixelsFromProjected(projectedPoint0, powerDifference, mTempPoint1);
				mPath.moveTo(screenPoint0.x, screenPoint0.y);
			}

			screenPoint1 = pj.getPixelsFromProjected(projectedPoint1, powerDifference, mTempPoint2);

			// skip this point, too close to previous point
			if (Math.abs(screenPoint1.x - screenPoint0.x) + Math.abs(screenPoint1.y - screenPoint0.y) <= 1) {
				continue;
			}

			mPath.lineTo(screenPoint1.x, screenPoint1.y);

			// update starting point to next position
			projectedPoint0 = projectedPoint1;
			screenPoint0.x = screenPoint1.x;
			screenPoint0.y = screenPoint1.y;
			mLineBounds.set(projectedPoint0.x, projectedPoint0.y, projectedPoint0.x, projectedPoint0.y);
		}

		canvas.drawPath(mPath, this.mPaint);
	}
926169
function fillPolygon(poly) {
         var points = poly.points;
         var glPoints = this._glPoints;
         var indices = poly.getIndices();
         var x = poly.pos.x,
             y = poly.pos.y; // Grow internal points buffer if necessary

         for (i = glPoints.length; i < indices.length; i++) {
           glPoints.push(new me.Vector2d());
         } // calculate all vertices


         for (var i = 0; i < indices.length; i++) {
           glPoints[i].set(x + points[indices[i]].x, y + points[indices[i]].y);
         } // draw all triangle


         this.compositor.drawTriangle(glPoints, indices.length);
       }
1304643
public void setPolygon(java.util.Collection<Point> polygon) {
        if (polygon == null) {
            this.polygon = null;
            return;
        }

        this.polygon = new java.util.ArrayList<Point>(polygon);
    }
192377
function(geometry, style, featureId) {
        if (style.fill !== false) {
            this.setCanvasStyle("fill", style);
            this.renderPath(this.canvas, geometry, style, featureId, "fill");
            if (this.hitDetection) {
                this.setHitContextStyle("fill", featureId, style);
                this.renderPath(this.hitContext, geometry, style, featureId, "fill");
            }
        }
        if (style.stroke !== false) {
            this.setCanvasStyle("stroke", style);
            this.renderPath(this.canvas, geometry, style, featureId, "stroke");
            if (this.hitDetection) {
                this.setHitContextStyle("stroke", featureId, style);
                this.renderPath(this.hitContext, geometry, style, featureId, "stroke");
            }
        }
        this.setCanvasStyle("reset");
    }
333894
public void strokeEllipse(Rectangle rect, Color color, float linewidth) {
		template.saveState();
		setStroke(color, linewidth, null);
		template.ellipse(origX + rect.getLeft(), origY + rect.getBottom(), origX + rect.getRight(),
				origY + rect.getTop());
		template.stroke();
		template.restoreState();
	}
1051176
protected void drawStroke(Canvas canvas) {
		resetPaint();
		getPaint().setStyle(Paint.Style.STROKE);
		getPaint().setStrokeWidth(getStrokeWidth());
		getPaint().setColor(getStrokeColor());
		canvas.drawCircle(calculateCenterX(), calculateCenterY(), calculateCircleRadius(), getPaint());
		LOGGER.trace("Drawn the Action Button stroke");
	}