Table of contents

ArcDrawingItem

The ArcDrawingItem class is a subclass of DrawingItem. It represents a drawing item that draws Arcs on the view.

Definition

Assembly: DynamsoftCameraEnhancer.xcframework

  • Objective-C
  • Swift
  1. @interface DSArcDrawingItem : DSDrawingItem
    
  2. class ArcDrawingItem : DSDrawingItem
    

Methods & Attributes

Method Description
initWithDrawingStyleId Create an instance of ArcDrawingItem with style, state, centre and radius.
initWithCentre Create an instance of ArcDrawingItem with centre and radius.
Attributes Type Description
centre CGPoint The centre of the ArcDrawingItem.
radius CGFloat The radius of the ArcDrawingItem.

Interited Methods

The following methods are inherited from the superclass DrawingItem.

Method Description
setDrawingStyleId Set the DrawingStyle of the DrawingItem. If a DrawingItem holds a drawing style ID, it will not use the default style of its layer.
getDrawingStyleId Get the DrawingStyle of the DrawingItem.
setState Set the state of the DrawingItem.
getState Get the state of the DrawingItem.
getCoordinateBase Get the coordinate base of the DrawingItem. The coordinate base is image by default.
getMediaType Get the media type of the DrawingItem.
addNote Add a note to the DrawingItem.
getNote Get the specified Note.
hasNote Check whether the specified Note exists.
updateNote Update the content of the specified Note.
deleteNote Remove the specified Note with the specified name.
getAllNotes Get all Notes of this DrawingItem.
clearNotes Remove all Notes of this DrawingItem.

initWithDrawingStyleId

Create an instance of ArcDrawingItem with style, state, centre and radius.

  • Objective-C
  • Swift
  1. - (instancetype)initWithDrawingStyleId:(NSUInteger)styleId
                                 state:(DSDrawingItemState)state
                                centre:(CGPoint)centre
                                radius:(CGFloat)radius;
    
  2. func initWithDrawingStyleId(styleId: UInt, state: DSDrawingItemState, centre: CGPoint, radius: CGFloat) -> ArcDrawingItem
    

Parameters

styleId: The drawing style ID of the ArcDrawingItem. If the style ID is 0, the ArcDrawingItem will use the default style.

state: The state of the ArcDrawingItem.

centre: The centre of the ArcDrawingItem.

radius: The radius of the ArcDrawingItem.

Return Value

An ArcDrawingItem object.

initWithCentre

Create an instance of ArcDrawingItem with centre and radius.

  • Objective-C
  • Swift
  1. - (instancetype)initWithCentre:(CGPoint)centre radius:(CGFloat)radius;
    
  2. func initWithCentre(centre: CGPoint, radius: CGFloat) -> ArcDrawingItem
    

Parameters

centre: The centre of the ArcDrawingItem.

radius: The radius of the ArcDrawingItem.

Return Value

An ArcDrawingItem object.

centre

Get the centre of the ArcDrawingItem.

  • Objective-C
  • Swift
  1. @property (nonatomic, assign, readonly) CGPoint centre;
    
  2. var centre: CGPoint { get }
    

radius

  • Objective-C
  • Swift
  1. @property (nonatomic, assign, readonly) CGFloat radius;
    
  2. var radius: CGFloat { get }
    

Is this page helpful?

YesYes NoNo

In this article: