@Name(value="cv::Size_<int>") @NoOffset @Properties(inherit=opencv_core.class) public class Size extends IntPointer
The class includes two members called width and height. The structure can be converted to and from the old OpenCV structures CvSize and CvSize2D32f . The same set of arithmetic and comparison operations as for Point_ is available.
OpenCV defines the following Size_\<\> aliases:
typedef Size_<int> Size2i;
typedef Size2i Size;
typedef Size_<float> Size2f;
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
Size()
default constructor
|
Size(int _width,
int _height) |
Size(long size)
Native array allocator.
|
Size(Point pt) |
Size(Pointer p)
Pointer cast constructor.
|
Size(Size sz) |
| Modifier and Type | Method and Description |
|---|---|
int |
area()
the area (width*height)
|
double |
aspectRatio()
aspect ratio (width/height)
|
boolean |
empty()
true if empty
|
int |
height()
the height
|
Size |
height(int setter) |
Size |
position(long position) |
Size |
put(Size sz) |
int |
width()
the width
|
Size |
width(int setter) |
asBuffer, capacity, get, get, get, get, getString, getStringCodePoints, limit, put, put, put, put, putStringaddress, asByteBuffer, availablePhysicalBytes, calloc, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic Size(Pointer p)
Pointer.Pointer(Pointer).public Size(long size)
Pointer.position(long).public Size()
public Size(int _width,
int _height)
public Size position(long position)
position in class IntPointerpublic int area()
public double aspectRatio()
public int width()
public Size width(int setter)
public int height()
public Size height(int setter)
Copyright © 2019. All rights reserved.