io.qt.gui.QRegion Maven / Gradle / Ivy
package io.qt.gui;
/**
* Specifies a clip region for a painter
* Java wrapper for Qt class QRegion
*/
public class QRegion extends io.qt.QtObject
implements java.lang.Iterable,
java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
private static long __qt_expenseCounter = 0;
/**
* Java wrapper for Qt enum QRegion::RegionType
*/
public enum RegionType implements io.qt.QtEnumerator {
Rectangle(0),
Ellipse(1);
private RegionType(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static RegionType resolve(int value) {
switch (value) {
case 0: return Rectangle;
case 1: return Ellipse;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
*
*/
public QRegion(){
super((QPrivateConstructor)null);
initialize_native(this);
boolean _dogc;
synchronized(io.qt.gui.QRegion.class){
if(_dogc = (__qt_expenseCounter += 1) > 4096)
__qt_expenseCounter = 0;
}
if (_dogc)
System.gc();
}
private native static void initialize_native(QRegion instance);
/**
*
*/
public QRegion(io.qt.gui.QBitmap bitmap){
super((QPrivateConstructor)null);
initialize_native(this, bitmap);
boolean _dogc;
synchronized(io.qt.gui.QRegion.class){
if(_dogc = (__qt_expenseCounter += 1) > 4096)
__qt_expenseCounter = 0;
}
if (_dogc)
System.gc();
}
private native static void initialize_native(QRegion instance, io.qt.gui.QBitmap bitmap);
/**
* Overloaded constructor for {@link #QRegion(io.qt.gui.QPolygon, io.qt.core.Qt.FillRule)}
* with fillRule = io.qt.core.Qt.FillRule.OddEvenFill
.
*/
public QRegion(io.qt.gui.QPolygon pa) {
this(pa, io.qt.core.Qt.FillRule.OddEvenFill);
}
/**
* See QRegion::QRegion(QPolygon,Qt::FillRule)
*/
public QRegion(io.qt.gui.QPolygon pa, io.qt.core.Qt.FillRule fillRule){
super((QPrivateConstructor)null);
initialize_native(this, pa, fillRule);
boolean _dogc;
synchronized(io.qt.gui.QRegion.class){
if(_dogc = (__qt_expenseCounter += 1) > 4096)
__qt_expenseCounter = 0;
}
if (_dogc)
System.gc();
}
private native static void initialize_native(QRegion instance, io.qt.gui.QPolygon pa, io.qt.core.Qt.FillRule fillRule);
/**
* Overloaded constructor for {@link #QRegion(io.qt.core.QRect, io.qt.gui.QRegion.RegionType)}
* with t = io.qt.gui.QRegion.RegionType.Rectangle
.
*/
public QRegion(io.qt.core.QRect r) {
this(r, io.qt.gui.QRegion.RegionType.Rectangle);
}
/**
* See QRegion::QRegion(QRect,QRegion::RegionType)
*/
public QRegion(io.qt.core.QRect r, io.qt.gui.QRegion.RegionType t){
super((QPrivateConstructor)null);
initialize_native(this, r, t);
boolean _dogc;
synchronized(io.qt.gui.QRegion.class){
if(_dogc = (__qt_expenseCounter += 1) > 4096)
__qt_expenseCounter = 0;
}
if (_dogc)
System.gc();
}
private native static void initialize_native(QRegion instance, io.qt.core.QRect r, io.qt.gui.QRegion.RegionType t);
/**
*
*/
public QRegion(io.qt.gui.QRegion region){
super((QPrivateConstructor)null);
initialize_native(this, region);
boolean _dogc;
synchronized(io.qt.gui.QRegion.class){
if(_dogc = (__qt_expenseCounter += 1) > 4096)
__qt_expenseCounter = 0;
}
if (_dogc)
System.gc();
}
private native static void initialize_native(QRegion instance, io.qt.gui.QRegion region);
/**
* Overloaded constructor for {@link #QRegion(int, int, int, int, io.qt.gui.QRegion.RegionType)}
* with t = io.qt.gui.QRegion.RegionType.Rectangle
.
*/
public QRegion(int x, int y, int w, int h) {
this(x, y, w, h, io.qt.gui.QRegion.RegionType.Rectangle);
}
/**
* See QRegion::QRegion(int,int,int,int,QRegion::RegionType)
*/
public QRegion(int x, int y, int w, int h, io.qt.gui.QRegion.RegionType t){
super((QPrivateConstructor)null);
initialize_native(this, x, y, w, h, t);
boolean _dogc;
synchronized(io.qt.gui.QRegion.class){
if(_dogc = (__qt_expenseCounter += 1) > 4096)
__qt_expenseCounter = 0;
}
if (_dogc)
System.gc();
}
private native static void initialize_native(QRegion instance, int x, int y, int w, int h, io.qt.gui.QRegion.RegionType t);
/**
*
*/
@io.qt.QtUninvokable
protected final io.qt.core.QIterator begin(){
return begin_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QIterator begin_native_constfct(long __this__nativeId);
/**
* See QRegion::boundingRect()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QRect boundingRect(){
return boundingRect_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QRect boundingRect_native_constfct(long __this__nativeId);
/**
* See QRegion::contains(QPoint)const
*/
@io.qt.QtUninvokable
public final boolean contains(io.qt.core.QPoint p){
return contains_native_cref_QPoint_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(p));
}
@io.qt.QtUninvokable
private native boolean contains_native_cref_QPoint_constfct(long __this__nativeId, long p);
/**
* See QRegion::contains(QRect)const
*/
@io.qt.QtUninvokable
public final boolean contains(io.qt.core.QRect r){
return contains_native_cref_QRect_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r));
}
@io.qt.QtUninvokable
private native boolean contains_native_cref_QRect_constfct(long __this__nativeId, long r);
/**
*
*/
@io.qt.QtUninvokable
protected final io.qt.core.QIterator end(){
return end_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QIterator end_native_constfct(long __this__nativeId);
/**
* See QRegion::intersected(QRect)const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QRegion intersected(io.qt.core.QRect r){
return intersected_native_cref_QRect_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r));
}
@io.qt.QtUninvokable
private native io.qt.gui.QRegion intersected_native_cref_QRect_constfct(long __this__nativeId, long r);
/**
* See QRegion::intersected(QRegion)const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QRegion intersected(io.qt.gui.QRegion r){
return intersected_native_cref_QRegion_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r));
}
@io.qt.QtUninvokable
private native io.qt.gui.QRegion intersected_native_cref_QRegion_constfct(long __this__nativeId, long r);
/**
* See QRegion::intersects(QRect)const
*/
@io.qt.QtUninvokable
public final boolean intersects(io.qt.core.QRect r){
return intersects_native_cref_QRect_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r));
}
@io.qt.QtUninvokable
private native boolean intersects_native_cref_QRect_constfct(long __this__nativeId, long r);
/**
* See QRegion::intersects(QRegion)const
*/
@io.qt.QtUninvokable
public final boolean intersects(io.qt.gui.QRegion r){
return intersects_native_cref_QRegion_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r));
}
@io.qt.QtUninvokable
private native boolean intersects_native_cref_QRegion_constfct(long __this__nativeId, long r);
/**
*
*/
@io.qt.QtUninvokable
public final boolean isEmpty(){
return isEmpty_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean isEmpty_native_constfct(long __this__nativeId);
/**
*
*/
@io.qt.QtUninvokable
public final boolean isNull(){
return isNull_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean isNull_native_constfct(long __this__nativeId);
@io.qt.QtUninvokable
public void writeTo(io.qt.core.QDataStream arg__1){
java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected.");
writeTo_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@io.qt.QtUninvokable
private native void writeTo_native_ref_QDataStream(long __this__nativeId, long arg__1);
/**
* See QRegion::operator==(QRegion)const
*/
@io.qt.QtUninvokable
private final boolean operator_equal(io.qt.gui.QRegion r){
return operator_equal_native_cref_QRegion_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r));
}
@io.qt.QtUninvokable
private native boolean operator_equal_native_cref_QRegion_constfct(long __this__nativeId, long r);
@io.qt.QtUninvokable
public void readFrom(io.qt.core.QDataStream arg__1){
java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected.");
readFrom_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@io.qt.QtUninvokable
private native void readFrom_native_ref_QDataStream(long __this__nativeId, long arg__1);
/**
*
*/
@io.qt.QtUninvokable
public final int rectCount(){
return rectCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int rectCount_native_constfct(long __this__nativeId);
/**
* See QRegion::setRects(const QRect*,int)
*/
@io.qt.QtUninvokable
public final void setRects(io.qt.core.QRect[] rect){
setRects_native_const_QRect_ptr_int(QtJambi_LibraryUtilities.internal.nativeId(this), rect);
}
@io.qt.QtUninvokable
private native void setRects_native_const_QRect_ptr_int(long __this__nativeId, io.qt.core.QRect[] rect);
/**
* See QRegion::subtracted(QRegion)const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QRegion subtracted(io.qt.gui.QRegion r){
return subtracted_native_cref_QRegion_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r));
}
@io.qt.QtUninvokable
private native io.qt.gui.QRegion subtracted_native_cref_QRegion_constfct(long __this__nativeId, long r);
/**
*
*/
@io.qt.QtUninvokable
public final void swap(io.qt.gui.QRegion other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
swap_native_ref_QRegion(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@io.qt.QtUninvokable
private native void swap_native_ref_QRegion(long __this__nativeId, long other);
/**
* See QRegion::translate(QPoint)
*/
@io.qt.QtUninvokable
public final void translate(io.qt.core.QPoint p){
translate_native_cref_QPoint(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(p));
}
@io.qt.QtUninvokable
private native void translate_native_cref_QPoint(long __this__nativeId, long p);
/**
* See QRegion::translate(int,int)
*/
@io.qt.QtUninvokable
public final void translate(int dx, int dy){
translate_native_int_int(QtJambi_LibraryUtilities.internal.nativeId(this), dx, dy);
}
@io.qt.QtUninvokable
private native void translate_native_int_int(long __this__nativeId, int dx, int dy);
/**
* See QRegion::translated(QPoint)const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QRegion translated(io.qt.core.QPoint p){
return translated_native_cref_QPoint_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(p));
}
@io.qt.QtUninvokable
private native io.qt.gui.QRegion translated_native_cref_QPoint_constfct(long __this__nativeId, long p);
/**
* See QRegion::translated(int,int)const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QRegion translated(int dx, int dy){
return translated_native_int_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), dx, dy);
}
@io.qt.QtUninvokable
private native io.qt.gui.QRegion translated_native_int_int_constfct(long __this__nativeId, int dx, int dy);
/**
* See QRegion::united(QRect)const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QRegion united(io.qt.core.QRect r){
return united_native_cref_QRect_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r));
}
@io.qt.QtUninvokable
private native io.qt.gui.QRegion united_native_cref_QRect_constfct(long __this__nativeId, long r);
/**
* See QRegion::united(QRegion)const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QRegion united(io.qt.gui.QRegion r){
return united_native_cref_QRegion_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r));
}
@io.qt.QtUninvokable
private native io.qt.gui.QRegion united_native_cref_QRegion_constfct(long __this__nativeId, long r);
/**
* See QRegion::xored(QRegion)const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QRegion xored(io.qt.gui.QRegion r){
return xored_native_cref_QRegion_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r));
}
@io.qt.QtUninvokable
private native io.qt.gui.QRegion xored_native_cref_QRegion_constfct(long __this__nativeId, long r);
@Override
public java.util.Iterator iterator() {
return begin().iterator();
}
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QRegion(QPrivateConstructor p) { super(p); }
@Override
@io.qt.QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.gui.QRegion) {
return operator_equal((io.qt.gui.QRegion) other);
}
return false;
}
@io.qt.QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native static int hashCode_native(long __this_nativeId);
@Override
@io.qt.QtUninvokable
public String toString() {
return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private static native String toString_native(long __this_nativeId);
@Override
public QRegion clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native QRegion clone_native(long __this_nativeId);
}