Draws this arc.

@param context the {@link Context2D} used to draw this arc.
497722
@Override
    protected boolean prepare(final Context2D context, final Attributes attr, final double alpha)
    {
        final double r = attr.getRadius();

        if (r > 0)
        {
            context.beginPath();

            context.arc(0, 0, r, attr.getStartAngle(), attr.getEndAngle(), attr.isCounterClockwise());

            return true;
        }
        return false;
    }
503102
public void draw(GraphicContext graphicContext) {
        if (!this.visible) {
            return;
        }

        if (this.mapViewDimension.getDimension() == null) {
            return;
        }

        if (this.isRedrawNecessary()) {
            redraw(this.mapScaleCanvas);
            this.redrawNeeded = false;
        }

        int positionLeft = calculatePositionLeft(0, this.mapViewDimension.getDimension().width, this.mapScaleBitmap.getWidth());
        int positionTop = calculatePositionTop(0, this.mapViewDimension.getDimension().height, this.mapScaleBitmap.getHeight());

        graphicContext.drawBitmap(this.mapScaleBitmap, positionLeft, positionTop);
    }
1152567
protected void renderDebugBoundingBoxOuter(Graphics2D context) {
		java.awt.Color previousColor = context.getColor();
		context.setColor(java.awt.Color.RED);
		Rectangle2D bb = getBoundingBox();
		bb.setRect(bb.getX()-1, bb.getY()-1, bb.getWidth()+2, bb.getHeight()+2);
		context.draw(bb);
		context.setColor(previousColor);
	}
373615
public void draw(GraphicContext graphicContext) {
        /*
         * Swap bitmaps here (and only here).
         * Swapping is done when layer manager has finished. Else draw old bitmap again.
         * This draw() is always called when layer manager has finished. This ensures that the
         * last generated frame is always put on screen.
         */

        // FIXME: resetting the background color is redundant if the background color of the map view is already set
        graphicContext.fillColor(this.displayModel.getBackgroundColor());

        swapBitmaps();

        synchronized (this.matrix) {
            Bitmap b = this.odBitmap.lock();
            if (b != null) {
                graphicContext.drawBitmap(b, this.matrix);
            }
        }

        /*
         * Release here so destroy() can free resources
         */
        this.odBitmap.release();
    }
1248547
def draw_oval(x, y, width, height)
      @context.drawOval(x, y, width, height)
    end
300585
public void setContext(Context context) {
        context.put(JavacElements.class, this);
        javaCompiler = JavaCompiler.instance(context);
        syms = Symtab.instance(context);
        names = Names.instance(context);
        types = Types.instance(context);
        enter = Enter.instance(context);
    }
1045722
def draw(self, context):
        """"""

        context.set_line_width(self.width)
        context.set_source_rgb(*self.color)

        context.move_to(*self.start_point)
        context.line_to(*self.end_point)
        context.stroke()
884648
function drawLinearTick(context, x1, y1, x2, y2) {
    context.beginPath();

    context.moveTo(x1, y1);
    context.lineTo(x2, y2);
    context.stroke();

    context.closePath();
    context.save();
}
368641
@Override
    protected boolean prepare(final Context2D context, final Attributes attr, final double alpha)
    {
        final double end = attr.getEndAngle();

        final double beg = attr.getStartAngle();

        if (beg == end)
        {
            return false;
        }
        final double ord = attr.getOuterRadius();

        final double ird = attr.getInnerRadius();

        final boolean ccw = attr.isCounterClockwise();

        if ((ord > 0) && (ird > 0))
        {
            context.beginPath();

            context.arc(0, 0, ord, beg, end, ccw);

            context.arc(0, 0, ird, end, beg, (false == ccw));

            context.closePath();

            return true;
        }
        return false;
    }
1166320
@Override
    public void draw(Canvas canvas) {
        drawSpacings(canvas);
        drawBaselineGrid(canvas);
        drawKeylines(canvas);
    }
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();
            }
        }
    }
232789
@Override
    protected boolean prepare(final Context2D context, final Attributes attr, final double alpha)
    {
        context.save();

        if (false == context.isSelection())
        {
            context.setGlobalAlpha(alpha);

            if (attr.hasShadow())
            {
                doApplyShadow(context, attr);
            }
        }
        getImageProxy().drawImage(context);

        context.restore();

        return false;
    }
148033
protected void configureContext(Context context) {
		this.contextLifecycleListeners.forEach(context::addLifecycleListener);
		new DisableReferenceClearingContextCustomizer().customize(context);
		this.tomcatContextCustomizers
				.forEach((customizer) -> customizer.customize(context));
	}
447967
function(coords, options) {
        this._drawOnCanvasContext(options, function(g) {
            options = options || {};
            // Simplify point sequence
            var segment = this._simplify(coords);
            g.beginPath();
            this._trace(g, segment);
            this._setStrokeStyles(g, options);
            g.stroke();
            g.closePath();
        });
    }
1261083
public static void initialize(
      Context context,
      @Nullable ImagePipelineConfig imagePipelineConfig,
      @Nullable DraweeConfig draweeConfig) {
    if (FrescoSystrace.isTracing()) {
      FrescoSystrace.beginSection("Fresco#initialize");
    }
    if (sIsInitialized) {
      FLog.w(
          TAG,
          "Fresco has already been initialized! `Fresco.initialize(...)` should only be called "
              + "1 single time to avoid memory leaks!");
    } else {
      sIsInitialized = true;
    }
    try {
      if (FrescoSystrace.isTracing()) {
        FrescoSystrace.beginSection("Fresco.initialize->SoLoader.init");
      }
      SoLoader.init(context, 0);
      if (FrescoSystrace.isTracing()) {
        FrescoSystrace.endSection();
      }
    } catch (IOException e) {
      if (FrescoSystrace.isTracing()) {
        FrescoSystrace.endSection();
      }
      throw new RuntimeException("Could not initialize SoLoader", e);
    }
    // we should always use the application context to avoid memory leaks
    context = context.getApplicationContext();
    if (imagePipelineConfig == null) {
      ImagePipelineFactory.initialize(context);
    } else {
      ImagePipelineFactory.initialize(imagePipelineConfig);
    }
    initializeDrawee(context, draweeConfig);
    if (FrescoSystrace.isTracing()) {
      FrescoSystrace.endSection();
    }
  }
951362
def draw_rectangle(x, y, width, height)
      @context.drawRect(x, y, width, height)
    end
823110
private void init(Context context) {
    try {
      if (FrescoSystrace.isTracing()) {
        FrescoSystrace.beginSection("DraweeView#init");
      }
      if (mInitialised) {
        return;
      }
      mInitialised = true;
      mDraweeHolder = DraweeHolder.create(null, context);
      if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        ColorStateList imageTintList = getImageTintList();
        if (imageTintList == null) {
          return;
        }
        setColorFilter(imageTintList.getDefaultColor());
      }
      // In Android N and above, visibility handling for Drawables has been changed, which breaks
      // activity transitions with DraweeViews.
      mLegacyVisibilityHandlingEnabled =
          sGlobalLegacyVisibilityHandlingEnabled
              && context.getApplicationInfo().targetSdkVersion >= 24; // Build.VERSION_CODES.N
    } finally {
      if (FrescoSystrace.isTracing()) {
        FrescoSystrace.endSection();
      }
    }
  }