|
| 1 | +--- |
| 2 | +layout: default-layout |
| 3 | +title: CornerType - Dynamsoft Core Enumerations |
| 4 | +description: The enumeration CornerType of Dynamsoft Core describes how the corner is formed by its sides. |
| 5 | +keywords: Corner type |
| 6 | +needGenerateH3Content: true |
| 7 | +needAutoGenerateSidebar: true |
| 8 | +noTitleIndex: true |
| 9 | +breadcrumbText: CornerType |
| 10 | +codeAutoHeight: true |
| 11 | +--- |
| 12 | + |
| 13 | +# Enumeration CornerType |
| 14 | + |
| 15 | +`CornerType` categorizes the nature of a corner based on the intersection of its adjoining sides. |
| 16 | + |
| 17 | +<div class="sample-code-prefix template2"></div> |
| 18 | + >- JavaScript |
| 19 | + >- Android |
| 20 | + >- Objective-C |
| 21 | + >- Swift |
| 22 | + >- C++ |
| 23 | + > |
| 24 | +> |
| 25 | +```javascript |
| 26 | +enum EnumCornerType { |
| 27 | + /** |
| 28 | + * Represents a corner formed by the standard intersection of two line segments at a point, creating a typical corner shape. |
| 29 | + * This is the most common corner type, where the angle between the line segments can vary from acute to obtuse. |
| 30 | + */ |
| 31 | + CT_NORMAL_INTERSECTED = 0, |
| 32 | + /** |
| 33 | + * Describes a corner where two line segments intersect in a T-shape. |
| 34 | + * This occurs when one line segment terminates at the midpoint of another, creating three distinct angles. |
| 35 | + */ |
| 36 | + CT_T_INTERSECTED = 1, |
| 37 | + /** |
| 38 | + * Characterizes a corner formed by two line segments intersecting each other in a cross shape. |
| 39 | + * This configuration results in four angles and is commonly encountered in grid or lattice patterns. |
| 40 | + */ |
| 41 | + CT_CROSS_INTERSECTED = 2, |
| 42 | + /** |
| 43 | + * Defines a scenario where two line segments do not physically intersect but conceptually form a corner. |
| 44 | + * This can occur in virtual shapes or when the corner is implied by the continuation of lines beyond their endpoints. |
| 45 | + */ |
| 46 | + CT_NOT_INTERSECTED = 3 |
| 47 | +} |
| 48 | +``` |
| 49 | +> |
| 50 | +```java |
| 51 | +@Retention(RetentionPolicy.CLASS) |
| 52 | +public @interface EnumCornerType |
| 53 | +{ |
| 54 | + /** The corner is formed by two intersecting line segments. */ |
| 55 | + public static final int CT_NORMAL_INTERSECTED = 0; |
| 56 | + /** The corner is formed by two T intersecting line segments. */ |
| 57 | + public static final int CT_T_INTERSECTED = 1; |
| 58 | + /** The corner is formed by two cross intersecting line segments. */ |
| 59 | + public static final int CT_CROSS_INTERSECTED = 2; |
| 60 | + /** The two line segments are not intersected but they definitely consist a corner. */ |
| 61 | + public static final int CT_NOT_INTERSECTED = 3; |
| 62 | +} |
| 63 | +``` |
| 64 | +> |
| 65 | +```objc |
| 66 | +typedef NS_ENUM(NSInteger, DSCornerType) |
| 67 | +{ |
| 68 | + /** The corner is formed by two intersecting line segments. */ |
| 69 | + DSCornerTypeNormalIntersected, |
| 70 | + /** The corner is formed by two T intersecting line segments. */ |
| 71 | + DSCornerTypeTIntersected, |
| 72 | + /** The corner is formed by two cross intersecting line segments. */ |
| 73 | + DSCornerTypeCrossIntersected, |
| 74 | + /** The two line segments are not intersected but they definitely consist a corner. */ |
| 75 | + DSCornerTypeNotIntersected |
| 76 | +}; |
| 77 | +``` |
| 78 | +> |
| 79 | +```swift |
| 80 | +public enum CornerType : Int |
| 81 | +{ |
| 82 | + /** The corner is formed by two intersecting line segments. */ |
| 83 | + intersected |
| 84 | + /** The corner is formed by two T intersecting line segments. */ |
| 85 | + tIntersected |
| 86 | + /** The corner is formed by two cross intersecting line segments. */ |
| 87 | + crossIntersected |
| 88 | + /** The two line segments are not intersected but they definitely consist a corner. */ |
| 89 | + notIntersected |
| 90 | +}; |
| 91 | +``` |
| 92 | +> |
| 93 | +```cpp |
| 94 | +typedef enum CornerType |
| 95 | +{ |
| 96 | + /* The sides of the corner is normally intersected. */ |
| 97 | + CT_NORMAL_INTERSECTED = 0, |
| 98 | + /* The sides of the corner is T-intersected. */ |
| 99 | + CT_T_INTERSECTED = 1, |
| 100 | + /* The sides of the corner is cross-intersected. */ |
| 101 | + CT_CROSS_INTERSECTED = 2, |
| 102 | + /* The sides are not intersected but they definitely make up a corner. */ |
| 103 | + CT_NOT_INTERSECTED = 3, |
| 104 | +} CornerType; |
| 105 | +``` |
0 commit comments