Resource Base
Table of contents

Thanks for downloading Dynamsoft Barcode Reader Package!

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

DSRect

The DSRect class represents a rectangle in 2D space, which contains four integer values that specify the top, left, right, and bottom edges of the rectangle.

Definition

Assembly: DynamsoftCore.framework

  • Objective-C
  • Swift
  1. @interface DSRect : NSObject
    
  2. class Rect : NSObject
    

Attributes

Attributes Type Description
top CGFloat The distance between the top of the rect and the x-axis. If measuredInPercentage = 1, the value specifies the percentage comparing with the height of the parent. If measuredInPercentage = 0, the value specifies a pixel length.
left CGFloat The distance between the left of the rect and the y-axis. If measuredInPercentage = 1, the value specifies the percentage comparing with the width of the parent. If measuredInPercentage = 0, the value specifies a pixel length.
right CGFloat The distance between the right of the rect and the y-axis. If measuredInPercentage = 1, the value specifies the percentage comparing with the width of the parent. If measuredInPercentage = 0, the value specifies a pixel length.
bottom CGFloat The distance between the bottom of the rect and the x-axis. If measuredInPercentage = 1, the value specifies the percentage comparing with the height of the parent. If measuredInPercentage = 0, the value specifies a pixel length.
measuredInPercentage BOOL Indicates if the rectangle’s measurements are in percentages.

top

The distance between the top of the rect and the x-axis. If measuredInPercentage = 1, the value specifies the percentage comparing with the height of the parent. If measuredInPercentage = 0, the value specifies a pixel length.

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

left

The distance between the left of the rect and the y-axis. If measuredInPercentage = 1, the value specifies the percentage comparing with the width of the parent. If measuredInPercentage = 0, the value specifies a pixel length.

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

The distance between the right of the rect and the y-axis. If measuredInPercentage = 1, the value specifies the percentage comparing with the width of the parent. If measuredInPercentage = 0, the value specifies a pixel length.

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

bottom

The distance between the bottom of the rect and the x-axis. If measuredInPercentage = 1, the value specifies the percentage comparing with the height of the parent. If measuredInPercentage = 0, the value specifies a pixel length.

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

measuredInPercentage

Sets whether to use percentages to measure the region size.

  • Objective-C
  • Swift
  1. @property (nonatomic, assign) BOOL measuredInPercentage
    
  2. var measuredInPercentage: Bool { get set }
    

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version
    • Version 2.x
      • Version 2.2.10
      • Version 2.0.21
      • Version 2.0.20
      • Version 2.0.10
      • Version 2.2.10
      • Version 2.0.21
      • Version 2.0.20
      • Version 2.0.10
    • Version 1.x
      • Version 1.2.1
      • Version 1.2.0
      • Version 1.1.0
      • Version 1.0.0
      • Version 1.0.4
      • Version 1.0.3
      • Version 1.0.2
      • Version 1.0.1
      • Version 1.0.0
      • Version 1.1.11
      • Version 1.1.9
      • Version 1.1.8
      • Version 1.1.7
      • Version 1.1.6
      • Version 1.1.5
      • Version 1.1.4
      • Version 1.1.3
      • Version 1.1.2
      • Version 1.1.1
      • Version 1.1.0
      • Version 1.0.0
      • Version 1.0.4
      • Version 1.0.3
      • Version 1.0.2
      • Version 1.0.1
      • Version 1.0.0
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support