Web Demos

BARCODE READER SDK DEMO

Explore the flexibe barcode reading settings to optimize for your specific usage scenario.

WEB TWAIN SDK DEMO

Try the most popular web scanner features: scan images, import local images and PDF files, edit, save to local, upload to database, and etc.

BARCODE READER JAVASCRIPT DEMO

Transform any camera-equipped devices into real-time, browser-based barcode and QR code scanners.

MRZ SCANNER WEB DEMO

Detects the machine-readable zone of a passport, scans the text, and parses into human-readable data.

APP STORE DEMOS

BARCODE READER SDK FOR IOS

BARCODE READER SDK FOR ANDROID

VIEW MORE DEMOS >
Documentation
Table of contents

Thanks for downloading Dynamsoft Label Recognizer Package!

Your download will start shortly. If your download does not begin, click here to retry.

DrawingStyleManager

DrawingStyleManager is the class for users to create and adjust DrawingStyles.

@interface DrawingStyleManager
Method Description
getDrawingStyle Get the DrawingStyle instance with the style ID.
createDrawingStyle Create a user-defined DrawingStyle instance.

 

getDrawingStyle

Get the DrawingStyle instance with the style ID.

+(DrawingStyle*)getDrawingStyle:(NSInteger)styleId;

Parameters

styleId: The ID of the target DrawingStyle.

Return Value

An instance of DrawingStyle.

Code Snippet

  • Objective-C
  • Swift
  1. DrawingStyle* style = [DrawingStyleManager getDrawingStyle:STYLE_BLUE_STROKE_FILL];
    
  2. let style = DrawingStyleManager.getDrawingStyle(STYLE_BLUE_STROKE_FILL)
    

Remarks

There are 8 preset drawing styles.

ID Style Name
1 STYLE_BLUE_STROKE_FILL
2 STYLE_GREEN_STROKE_FILL
3 STYLE_ORANGE_STROKE_FILL
4 STYLE_YELLOW_STROKE_FILL
5 STYLE_BLUE_STROKE_FILL
6 STYLE_GREEN_STROKE_FILL
7 STYLE_ORANGE_STROKE_FILL
8 STYLE_YELLOW_STROKE_FILL

 

createDrawingStyle

Create a user-defined DrawingStyle instance.

+(NSInteger)createDrawingStyle:(UIColor*)strokeColor
                   strokeWidth:(CGFloat)strokeWidth
                     fillColor:(UIColor*) fillColor
                     textColor:(UIColor*) textColor
                          font:(UIFont*) font;

Parameters

strokeColor: The stroke colour. strokeWidth: The width of the stroke. fillColor: The fill colour. textColor: The text colour. font: The font style of the text.

Code Snippet

  • Objective-C
  • Swift
  1. UIColor *strokeColour = [UIColor colorWithRed:0.2 green:0.3 blue:0.4 alpha:0.5];
    UIColor *fillColour = [UIColor colorWithRed:0.2 green:0.3 blue:0.4 alpha:0.5];
    UIColor *textColour = [UIColor colorWithRed:0.2 green:0.3 blue:0.4 alpha:0.5];
    UIFont *textFont = [UIFont systemFontOfSize:12.0];
    NSInteger myStyle = [DrawingStyleManager createDrawingStyle:strokeColour strokeWidth:2.0 fillColor:fillColour textColor:textColour font:textFont];
    
  2. let strokeColor = UIColor.init(red: 0.2, green: 0.3, blue: 0.4, alpha: 0.5)
    let fillColour = UIColor.init(red: 0.2, green: 0.3, blue: 0.4, alpha: 0.5)
    let textColor = UIColor.init(red: 0.2, green: 0.3, blue: 0.4, alpha: 0.5)
    let textFont = UIFont.systemFont(ofSize: 12, weight: UIFont.weight.light)
    let myStyleID = DrawingStyleManager.createDrawingStyle(strokeColor, strokeWidth:1, fillColor:fillColor, textColor:textColor, font: textFont)
    

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version
    • Version 2.2.20
    • Version 2.2.11
    • Version 2.2.10
    • Version 2.2.0
    • Version 2.0.0
    • Version 1.2.1
    • Version 1.2
    • Version 1.0
    Change +
    © 2003–2023 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support