Resource Base
Table of contents

DrawingItem

The DrawingItem class represents a base class for drawing items, which can be added to drawing layers to draw basic graphics on the view.

Definition

Assembly: package com.dynamsoft.dce

class DrawingItem

Methods

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.

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.

void setDrawingStyleId(int style){}

Parameters

style: Specifiy a style ID for the DrawingItem.

getDrawingStyleId

Get the DrawingStyle of the DrawingItem.

int getDrawingStyleId(){}

Return Value

The style ID of the DrawingItem.

setState

Set the state of the DrawingItem.

void setState(@EnumDrawingItemState int state){}

Parameters

state: The state of the DrawingItem.

getState

The state of the DrawingItem.

@EnumDrawingItemState int getState(){}

Return Value

The state of the DrawingItem.

getCoordinateBase

Get the coordinate base of the DrawingItem. The coordinate base is image by default.

@EnumCoordinateBase int getCoordinateBase(){}

Return Value

The coordinate base of the DrawingItem.

getMediaType

An abstract method to get the media type of the DrawingItem.

abstract int getMediaType(){}

Return Value

The media type of the DrawingItem.

addNote

Add a note to the DrawingItem.

void addNote(Note note, boolean replace){}

Parameters

note: The Note object to add.
replace: Whether to replace the previous one when there already exists a Note with the same name.

getNote

Get the specified Note.

Note getNote(String noteName){}

Parameters

noteName: The name of the Note.

Return Value

The specified Note object.

hasNote

Check whether the specified Note exists.

boolean hasNote(String noteName){}

Parameters

noteName: The name of the Note.

Return Value

Whether the specified Note exists.

updateNote

Update the content of the specified Note.

boolean updateNote(String noteName, String content, boolean mergeContent){}

Parameters

name: The name of the Note.
content: The content to add or replace with.
mergeContent: If true, merge the new content to the previous content. Otherwise, replace it.

deleteNote

Remove the specified Note with the specified name.

void deleteNote(String noteName){}

Parameters

name: The name of the Note.

getAllNotes

Get all Notes of this DrawingItem.

Note[] getAllNotes(){}

Return Value

An array of Note.

clearNotes

Remove all Notes of this DrawingItem.

void clearNotes(){}

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version
  • Version 4.x
    • Version 4.2.10
    • Version 4.2.1
    • Version 4.2.0
    • Version 4.0.2
    • Version 4.0.1
    • Version 4.0.0
  • Version 3.x
    • Version 3.0.3
    • Version 3.0.2
    • Version 3.0.1
    • Version 3.0.0
  • Version 2.x
    • Version 2.3.21
    • Version 2.3.20
    • Version 2.3.12
    • Version 2.3.11
    • Version 2.3.10
    • Version 2.3.5
    • Version 2.3.4
    • Version 2.3.3
    • Version 2.3.2
    • Version 2.3.1
    • Version 2.3.0
    • Version 2.1.4
    • Version 2.1.3
    • Version 2.1.1
    • Version 2.0.0
Change +