All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.pdf.QPdfDocumentRenderOptions Maven / Gradle / Ivy

There is a newer version: 6.8.0
Show newest version
package io.qt.pdf;

import io.qt.*;


/**
 * 

Holds the options to render a page from a PDF document

*

Java wrapper for Qt class QPdfDocumentRenderOptions

*/ public class QPdfDocumentRenderOptions extends QtObject implements java.lang.Cloneable { static { QtJambi_LibraryUtilities.initialize(); } /** *

Java wrapper for Qt enum QPdfDocumentRenderOptions::RenderFlag

* * @see RenderFlags */ public enum RenderFlag implements QtFlagEnumerator { /** *

Representing QPdfDocumentRenderOptions::RenderFlag::None

*/ None(0), /** *

Representing QPdfDocumentRenderOptions::RenderFlag::Annotations

*/ Annotations(1), /** *

Representing QPdfDocumentRenderOptions::RenderFlag::OptimizedForLcd

*/ OptimizedForLcd(2), /** *

Representing QPdfDocumentRenderOptions::RenderFlag::Grayscale

*/ Grayscale(4), /** *

Representing QPdfDocumentRenderOptions::RenderFlag::ForceHalftone

*/ ForceHalftone(8), /** *

Representing QPdfDocumentRenderOptions::RenderFlag::TextAliased

*/ TextAliased(16), /** *

Representing QPdfDocumentRenderOptions::RenderFlag::ImageAliased

*/ ImageAliased(32), /** *

Representing QPdfDocumentRenderOptions::RenderFlag::PathAliased

*/ PathAliased(64); static { QtJambi_LibraryUtilities.initialize(); } private RenderFlag(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ public @NonNull RenderFlags asFlags() { return new RenderFlags(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public @NonNull RenderFlags combined(@NonNull RenderFlag e) { return asFlags().setFlag(e, true); } /** * Excludes other enum entry from a flag of this entry. * @param e enum entry * @return new flag */ public @NonNull RenderFlags cleared(@NonNull RenderFlag e) { return asFlags().setFlag(e, false); } /** * Creates a new {@link RenderFlags} from the entries. * @param values entries * @return new flag */ public static @NonNull RenderFlags flags(@Nullable RenderFlag @NonNull... values) { return new RenderFlags(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull RenderFlag resolve(int value) { switch (value) { case 0: return None; case 1: return Annotations; case 2: return OptimizedForLcd; case 4: return Grayscale; case 8: return ForceHalftone; case 16: return TextAliased; case 32: return ImageAliased; case 64: return PathAliased; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** * {@link QFlags} type for enum {@link RenderFlag} */ public static final class RenderFlags extends QFlags implements Comparable { private static final long serialVersionUID = 0xc5275907bfed457bL; static { QtJambi_LibraryUtilities.initialize(); } /** * Creates a new RenderFlags where the flags in args are set. * @param args enum entries */ public RenderFlags(@Nullable RenderFlag @NonNull... args){ super(args); } /** * Creates a new RenderFlags with given value. * @param value */ public RenderFlags(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new RenderFlags */ @Override public final @NonNull RenderFlags combined(@StrictNonNull RenderFlag e){ return new RenderFlags(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ public final @NonNull RenderFlags setFlag(@Nullable RenderFlag e){ return setFlag(e, true); } /** * Sets or clears the flag flag * @param e enum entry * @param on set (true) or clear (false) * @return this */ public final @NonNull RenderFlags setFlag(@Nullable RenderFlag e, boolean on){ if (on) { setValue(value() | e.value()); }else { setValue(value() & ~e.value()); } return this; } /** * Returns an array of flag objects represented by this RenderFlags. * @return array of enum entries */ @Override public final @NonNull RenderFlag @NonNull[] flags(){ return super.flags(RenderFlag.values()); } /** * {@inheritDoc} */ @Override public final @NonNull RenderFlags clone(){ return new RenderFlags(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(@StrictNonNull RenderFlags other){ return Integer.compare(value(), other.value()); } } /** *

Java wrapper for Qt enum QPdfDocumentRenderOptions::Rotation

*/ public enum Rotation implements QtEnumerator { /** *

Representing QPdfDocumentRenderOptions::Rotation::None

*/ None(0), /** *

Representing QPdfDocumentRenderOptions::Rotation::Clockwise90

*/ Clockwise90(1), /** *

Representing QPdfDocumentRenderOptions::Rotation::Clockwise180

*/ Clockwise180(2), /** *

Representing QPdfDocumentRenderOptions::Rotation::Clockwise270

*/ Clockwise270(3); static { QtJambi_LibraryUtilities.initialize(); } private Rotation(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 @NonNull Rotation resolve(int value) { switch (value) { case 0: return None; case 1: return Clockwise90; case 2: return Clockwise180; case 3: return Clockwise270; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

See QPdfDocumentRenderOptions::QPdfDocumentRenderOptions()

*/ public QPdfDocumentRenderOptions(){ super((QPrivateConstructor)null); initialize_native(this); } private native static void initialize_native(QPdfDocumentRenderOptions instance); /** *

See QPdfDocumentRenderOptions::QPdfDocumentRenderOptions(QPdfDocumentRenderOptions)

*/ public QPdfDocumentRenderOptions(io.qt.pdf.@NonNull QPdfDocumentRenderOptions other){ super((QPrivateConstructor)null); initialize_native(this, other); } private native static void initialize_native(QPdfDocumentRenderOptions instance, io.qt.pdf.QPdfDocumentRenderOptions other); /** *

See operator==(QPdfDocumentRenderOptions,QPdfDocumentRenderOptions)

*/ @QtUninvokable public final boolean equals(io.qt.pdf.@NonNull QPdfDocumentRenderOptions rhs){ return equals_native_cref_QPdfDocumentRenderOptions(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs)); } @QtUninvokable private native boolean equals_native_cref_QPdfDocumentRenderOptions(long __this__nativeId, long rhs); /** *

See QPdfDocumentRenderOptions::renderFlags()const

*/ @QtUninvokable public final io.qt.pdf.QPdfDocumentRenderOptions.@NonNull RenderFlags renderFlags(){ return new io.qt.pdf.QPdfDocumentRenderOptions.RenderFlags(renderFlags_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int renderFlags_native_constfct(long __this__nativeId); /** *

See QPdfDocumentRenderOptions::rotation()const

*/ @QtUninvokable public final io.qt.pdf.QPdfDocumentRenderOptions.@NonNull Rotation rotation(){ return io.qt.pdf.QPdfDocumentRenderOptions.Rotation.resolve(rotation_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int rotation_native_constfct(long __this__nativeId); /** *

See QPdfDocumentRenderOptions::scaledClipRect()const

*/ @QtUninvokable public final io.qt.core.@NonNull QRect scaledClipRect(){ return scaledClipRect_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QRect scaledClipRect_native_constfct(long __this__nativeId); /** *

See QPdfDocumentRenderOptions::scaledSize()const

*/ @QtUninvokable public final io.qt.core.@NonNull QSize scaledSize(){ return scaledSize_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QSize scaledSize_native_constfct(long __this__nativeId); /** *

See QPdfDocumentRenderOptions::setRenderFlags(QPdfDocumentRenderOptions::RenderFlags)

*/ @QtUninvokable public final void setRenderFlags(io.qt.pdf.QPdfDocumentRenderOptions.@NonNull RenderFlags r){ setRenderFlags_native_QPdfDocumentRenderOptions_RenderFlags(QtJambi_LibraryUtilities.internal.nativeId(this), r.value()); } @QtUninvokable private native void setRenderFlags_native_QPdfDocumentRenderOptions_RenderFlags(long __this__nativeId, int r); /** *

See QPdfDocumentRenderOptions::setRotation(QPdfDocumentRenderOptions::Rotation)

*/ @QtUninvokable public final void setRotation(io.qt.pdf.QPdfDocumentRenderOptions.@NonNull Rotation r){ setRotation_native_QPdfDocumentRenderOptions_Rotation(QtJambi_LibraryUtilities.internal.nativeId(this), r.value()); } @QtUninvokable private native void setRotation_native_QPdfDocumentRenderOptions_Rotation(long __this__nativeId, int r); /** *

See QPdfDocumentRenderOptions::setScaledClipRect(QRect)

*/ @QtUninvokable public final void setScaledClipRect(io.qt.core.@NonNull QRect r){ setScaledClipRect_native_cref_QRect(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r)); } @QtUninvokable private native void setScaledClipRect_native_cref_QRect(long __this__nativeId, long r); /** *

See QPdfDocumentRenderOptions::setScaledSize(QSize)

*/ @QtUninvokable public final void setScaledSize(io.qt.core.@NonNull QSize s){ setScaledSize_native_cref_QSize(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(s)); } @QtUninvokable private native void setScaledSize_native_cref_QSize(long __this__nativeId, long s); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QPdfDocumentRenderOptions(QPrivateConstructor p) { super(p); } /** *

See operator==(QPdfDocumentRenderOptions,QPdfDocumentRenderOptions)

*/ @Override @QtUninvokable public boolean equals(Object other) { if (other instanceof io.qt.pdf.QPdfDocumentRenderOptions) { return equals((io.qt.pdf.QPdfDocumentRenderOptions) other); } return false; } /** * Returns the objects's hash code computed by qHash(QPdfDocumentRenderOptions). */ @QtUninvokable @Override public int hashCode() { return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native static int hashCode_native(long __this_nativeId); /** *

Creates and returns a copy of this object.

See QPdfDocumentRenderOptions::QPdfDocumentRenderOptions(QPdfDocumentRenderOptions)

*/ @QtUninvokable @Override public QPdfDocumentRenderOptions clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private static native QPdfDocumentRenderOptions clone_native(long __this_nativeId); /** *

Overloaded function for {@link #setRenderFlags(io.qt.pdf.QPdfDocumentRenderOptions.RenderFlags)}.

*/ @QtUninvokable public final void setRenderFlags(io.qt.pdf.QPdfDocumentRenderOptions.@NonNull RenderFlag @NonNull... r) { setRenderFlags(new io.qt.pdf.QPdfDocumentRenderOptions.RenderFlags(r)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy