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
@interface DSArcDrawingItem : DSDrawingItem
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
- (instancetype)initWithDrawingStyleId:(NSUInteger)styleId state:(DSDrawingItemState)state centre:(CGPoint)centre radius:(CGFloat)radius;
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
- (instancetype)initWithCentre:(CGPoint)centre radius:(CGFloat)radius;
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
@property (nonatomic, assign, readonly) CGPoint centre;
var centre: CGPoint { get }
radius
- Objective-C
- Swift
@property (nonatomic, assign, readonly) CGFloat radius;
var radius: CGFloat { get }