Skip to content

Latest commit

 

History

History
168 lines (109 loc) · 3.99 KB

circle.md

File metadata and controls

168 lines (109 loc) · 3.99 KB
title page_title
Circle
API reference for Kendo UI Drawing API Circle

kendo.drawing.Circle : kendo.drawing.Element

Draws a circle with set geometry, fill and stroke.

Example - creating a circle

<div id="surface"></div>
<script>
    var draw = kendo.drawing;
    var geom = kendo.geometry;

    var circleGeometry = new geom.Circle([100, 100], 20);
    var circle = new draw.Circle(circleGeometry).stroke("red", 1);

    var surface = draw.Surface.create($("#surface"));
    surface.draw(circle);
</script>

Constructor Parameters

geometry kendo.geometry.Circle

The geometric object that defines the circle center and radius.

options Object

The configuration options.

Configuration

clip kendo.drawing.Path

The element clipping path. Inherited from Element.clip

fill kendo.drawing.FillOptions

The fill options of the shape.

opacity Number

The element opacity. Inherited from Element.opacity

stroke kendo.drawing.StrokeOptions

The stroke options of the shape.

transform kendo.geometry.Transformation

The transformation to apply to this element. Inherited from Element.transform

visible Boolean

A flag, indicating if the element is visible. Inherited from Element.visible

Methods

bbox

Returns the bounding box of the element with transformations applied. Inherited from Element.bbox

Returns

kendo.geometry.Rect The bounding box of the element with transformations applied.

clip

Gets or sets the element clipping path. Inherited from Element.clip

Parameters

clip kendo.drawing.Path

The element clipping path.

Returns

kendo.drawing.Path The current element clipping path.

clippedBBox

Returns the bounding box of the element with clipping and transformations applied. Inherited from Element.clippedBBox

Returns

kendo.geometry.Rect The bounding box of the element with clipping transformations applied.

geometry

Gets or sets the circle geometry.

Parameters

value kendo.geometry.Circle

The new geometry to use.

Returns

kendo.geometry.Circle The current circle geometry.

fill

Sets the shape fill.

Parameters

color String

The fill color to set.

opacity Number optional

The fill opacity to set.

Returns

kendo.drawing.Circle The current instance to allow chaining.

opacity

Gets or sets the element opacity. Inherited from Element.opacity

If set, the stroke and fill opacity will be multiplied by the element opacity.

Parameters

opacity Number

The element opacity. Ranges from 0 (completely transparent) to 1 (completely opaque).

Returns

Number The current element opacity.

stroke

Sets the shape stroke.

Parameters

color String

The stroke color to set.

width Number optional

The stroke width to set.

opacity Number optional

The stroke opacity to set.

Returns

kendo.drawing.Circle The current instance to allow chaining.

transform

Gets or sets the transformation of the element. Inherited from Element.transform

Parameters

transform kendo.geometry.Transformation

The transformation to apply to the element.

Returns

kendo.geometry.Transformation The current transformation on the element.

visible

Gets or sets the visibility of the element. Inherited from Element.visible

Parameters

visible Boolean

A flag indicating if the element should be visible.

Returns

Boolean true if the element is visible; false otherwise.