@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, Pointer.ReferenceCounter| 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
|
Size |
getPointer(long i) |
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, putString, sizeofaddress, asByteBuffer, availablePhysicalBytes, calloc, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic Size(Pointer p)
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 Size getPointer(long i)
getPointer 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 © 2025. All rights reserved.