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

io.qt.gui.QRawFont Maven / Gradle / Ivy

The newest version!
package io.qt.gui;


/**
 * 

Access to a single physical instance of a font

*

Java wrapper for Qt class QRawFont

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

Java wrapper for Qt enum QRawFont::AntialiasingType

*/ public enum AntialiasingType implements io.qt.QtEnumerator { PixelAntialiasing(0), SubPixelAntialiasing(1); private AntialiasingType(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 AntialiasingType resolve(int value) { switch (value) { case 0: return PixelAntialiasing; case 1: return SubPixelAntialiasing; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QRawFont::LayoutFlag

* * @see LayoutFlags */ public enum LayoutFlag implements io.qt.QtFlagEnumerator { SeparateAdvances(0), KernedAdvances(1), UseDesignMetrics(2); private LayoutFlag(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ public LayoutFlags asFlags() { return new LayoutFlags(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public LayoutFlags combined(LayoutFlag e) { return new LayoutFlags(this, e); } /** * Creates a new {@link LayoutFlags} from the entries. * @param values entries * @return new flag */ public static LayoutFlags flags(LayoutFlag ... values) { return new LayoutFlags(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static LayoutFlag resolve(int value) { switch (value) { case 0: return SeparateAdvances; case 1: return KernedAdvances; case 2: return UseDesignMetrics; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** * QFlags type for enum {@link LayoutFlag} */ public static final class LayoutFlags extends io.qt.QFlags implements Comparable { private static final long serialVersionUID = 0x4713f1cf00fefce2L; /** * Creates a new LayoutFlags where the flags in args are set. * @param args enum entries */ public LayoutFlags(LayoutFlag ... args){ super(args); } /** * Creates a new LayoutFlags with given value. * @param value */ public LayoutFlags(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new LayoutFlags */ @Override public final LayoutFlags combined(LayoutFlag e){ return new LayoutFlags(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ public final LayoutFlags setFlag(LayoutFlag e){ super.setFlag(e); return this; } /** * Sets or clears the flag flag * @param e enum entry * @param on set (true) or clear (false) * @return this */ public final LayoutFlags setFlag(LayoutFlag e, boolean on){ super.setFlag(e, on); return this; } /** * Returns an array of flag objects represented by this LayoutFlags. * @return array of enum entries */ @Override public final LayoutFlag[] flags(){ return super.flags(LayoutFlag.values()); } /** * {@inheritDoc} */ @Override public final LayoutFlags clone(){ return new LayoutFlags(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(LayoutFlags other){ return Integer.compare(value(), other.value()); } } /** *

See QRawFont::QRawFont()

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

Overloaded constructor for {@link #QRawFont(io.qt.core.QByteArray, double, io.qt.gui.QFont.HintingPreference)} * with hintingPreference = io.qt.gui.QFont.HintingPreference.PreferDefaultHinting.

*/ public QRawFont(io.qt.core.QByteArray fontData, double pixelSize) { this(fontData, pixelSize, io.qt.gui.QFont.HintingPreference.PreferDefaultHinting); } /** *

See QRawFont::QRawFont(QByteArray,qreal,QFont::HintingPreference)

*/ public QRawFont(io.qt.core.QByteArray fontData, double pixelSize, io.qt.gui.QFont.HintingPreference hintingPreference){ super((QPrivateConstructor)null); initialize_native(this, fontData, pixelSize, hintingPreference); } private native static void initialize_native(QRawFont instance, io.qt.core.QByteArray fontData, double pixelSize, io.qt.gui.QFont.HintingPreference hintingPreference); /** *

See QRawFont::QRawFont(QRawFont)

*/ public QRawFont(io.qt.gui.QRawFont other){ super((QPrivateConstructor)null); initialize_native(this, other); } private native static void initialize_native(QRawFont instance, io.qt.gui.QRawFont other); /** *

Overloaded constructor for {@link #QRawFont(java.lang.String, double, io.qt.gui.QFont.HintingPreference)} * with hintingPreference = io.qt.gui.QFont.HintingPreference.PreferDefaultHinting.

*/ public QRawFont(java.lang.String fileName, double pixelSize) { this(fileName, pixelSize, io.qt.gui.QFont.HintingPreference.PreferDefaultHinting); } /** *

See QRawFont::QRawFont(QString,qreal,QFont::HintingPreference)

*/ public QRawFont(java.lang.String fileName, double pixelSize, io.qt.gui.QFont.HintingPreference hintingPreference){ super((QPrivateConstructor)null); initialize_native(this, fileName, pixelSize, hintingPreference); } private native static void initialize_native(QRawFont instance, java.lang.String fileName, double pixelSize, io.qt.gui.QFont.HintingPreference hintingPreference); /** *

See QRawFont::advancesForGlyphIndexes(QList<quint32>)const

*/ @io.qt.QtUninvokable public final io.qt.core.QList advancesForGlyphIndexes(java.util.Collection glyphIndexes){ return advancesForGlyphIndexes_native_cref_QList_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), glyphIndexes); } @io.qt.QtUninvokable private native io.qt.core.QList advancesForGlyphIndexes_native_cref_QList_constfct(long __this__nativeId, java.util.Collection glyphIndexes); /** *

Overloaded function for {@link #advancesForGlyphIndexes(java.util.Collection, io.qt.gui.QRawFont.LayoutFlags)}.

*/ @io.qt.QtUninvokable public final io.qt.core.QList advancesForGlyphIndexes(java.util.Collection glyphIndexes, io.qt.gui.QRawFont.LayoutFlag ... layoutFlags){ return advancesForGlyphIndexes(glyphIndexes, new io.qt.gui.QRawFont.LayoutFlags(layoutFlags)); } /** *

See QRawFont::advancesForGlyphIndexes(QList<quint32>,QRawFont::LayoutFlags)const

*/ @io.qt.QtUninvokable public final io.qt.core.QList advancesForGlyphIndexes(java.util.Collection glyphIndexes, io.qt.gui.QRawFont.LayoutFlags layoutFlags){ return advancesForGlyphIndexes_native_cref_QList_QFlags_QRawFont_LayoutFlag__constfct(QtJambi_LibraryUtilities.internal.nativeId(this), glyphIndexes, layoutFlags.value()); } @io.qt.QtUninvokable private native io.qt.core.QList advancesForGlyphIndexes_native_cref_QList_QFlags_QRawFont_LayoutFlag__constfct(long __this__nativeId, java.util.Collection glyphIndexes, int layoutFlags); /** *

Overloaded function for {@link #alphaMapForGlyph(int, io.qt.gui.QRawFont.AntialiasingType, io.qt.gui.QTransform)} * with transform = new io.qt.gui.QTransform().

*/ @io.qt.QtUninvokable public final io.qt.gui.QImage alphaMapForGlyph(int glyphIndex, io.qt.gui.QRawFont.AntialiasingType antialiasingType) { return alphaMapForGlyph(glyphIndex, antialiasingType, new io.qt.gui.QTransform()); } /** *

Overloaded function for {@link #alphaMapForGlyph(int, io.qt.gui.QRawFont.AntialiasingType, io.qt.gui.QTransform)}

*

with:

    *
  • antialiasingType = io.qt.gui.QRawFont.AntialiasingType.SubPixelAntialiasing
  • *
  • transform = new io.qt.gui.QTransform()
  • *
*/ @io.qt.QtUninvokable public final io.qt.gui.QImage alphaMapForGlyph(int glyphIndex) { return alphaMapForGlyph(glyphIndex, io.qt.gui.QRawFont.AntialiasingType.SubPixelAntialiasing, new io.qt.gui.QTransform()); } /** *

See QRawFont::alphaMapForGlyph(quint32,QRawFont::AntialiasingType,QTransform)const

*/ @io.qt.QtUninvokable public final io.qt.gui.QImage alphaMapForGlyph(int glyphIndex, io.qt.gui.QRawFont.AntialiasingType antialiasingType, io.qt.gui.QTransform transform){ return alphaMapForGlyph_native_unsigned_int_QRawFont_AntialiasingType_cref_QTransform_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), glyphIndex, antialiasingType.value(), QtJambi_LibraryUtilities.internal.checkedNativeId(transform)); } @io.qt.QtUninvokable private native io.qt.gui.QImage alphaMapForGlyph_native_unsigned_int_QRawFont_AntialiasingType_cref_QTransform_constfct(long __this__nativeId, int glyphIndex, int antialiasingType, long transform); /** *

See QRawFont::ascent()const

*/ @io.qt.QtUninvokable public final double ascent(){ return ascent_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native double ascent_native_constfct(long __this__nativeId); /** *

See QRawFont::averageCharWidth()const

*/ @io.qt.QtUninvokable public final double averageCharWidth(){ return averageCharWidth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native double averageCharWidth_native_constfct(long __this__nativeId); /** *

See QRawFont::boundingRect(quint32)const

*/ @io.qt.QtUninvokable public final io.qt.core.QRectF boundingRect(int glyphIndex){ return boundingRect_native_unsigned_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), glyphIndex); } @io.qt.QtUninvokable private native io.qt.core.QRectF boundingRect_native_unsigned_int_constfct(long __this__nativeId, int glyphIndex); /** *

See QRawFont::capHeight()const

*/ @io.qt.QtUninvokable public final double capHeight(){ return capHeight_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native double capHeight_native_constfct(long __this__nativeId); /** *

See QRawFont::descent()const

*/ @io.qt.QtUninvokable public final double descent(){ return descent_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native double descent_native_constfct(long __this__nativeId); /** *

See QRawFont::familyName()const

*/ @io.qt.QtUninvokable public final java.lang.String familyName(){ return familyName_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native java.lang.String familyName_native_constfct(long __this__nativeId); /** *

See QRawFont::fontTable(const char*)const

*/ @io.qt.QtUninvokable public final io.qt.core.QByteArray fontTable(java.lang.String tagName){ return fontTable_native_const_char_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), tagName); } @io.qt.QtUninvokable private native io.qt.core.QByteArray fontTable_native_const_char_ptr_constfct(long __this__nativeId, java.lang.String tagName); /** *

See QRawFont::glyphIndexesForString(QString)const

*/ @io.qt.QtUninvokable public final io.qt.core.QList glyphIndexesForString(java.lang.String text){ return glyphIndexesForString_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), text); } @io.qt.QtUninvokable private native io.qt.core.QList glyphIndexesForString_native_cref_QString_constfct(long __this__nativeId, java.lang.String text); /** *

See QRawFont::hintingPreference()const

*/ @io.qt.QtUninvokable public final io.qt.gui.QFont.HintingPreference hintingPreference(){ return io.qt.gui.QFont.HintingPreference.resolve(hintingPreference_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int hintingPreference_native_constfct(long __this__nativeId); /** *

See QRawFont::isValid()const

*/ @io.qt.QtUninvokable public final boolean isValid(){ return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native boolean isValid_native_constfct(long __this__nativeId); /** *

See QRawFont::leading()const

*/ @io.qt.QtUninvokable public final double leading(){ return leading_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native double leading_native_constfct(long __this__nativeId); /** *

See QRawFont::lineThickness()const

*/ @io.qt.QtUninvokable public final double lineThickness(){ return lineThickness_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native double lineThickness_native_constfct(long __this__nativeId); /** *

See QRawFont::loadFromData(QByteArray,qreal,QFont::HintingPreference)

*/ @io.qt.QtUninvokable public final void loadFromData(io.qt.core.QByteArray fontData, double pixelSize, io.qt.gui.QFont.HintingPreference hintingPreference){ loadFromData_native_cref_QByteArray_qtjambireal_QFont_HintingPreference(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(fontData), pixelSize, hintingPreference.value()); } @io.qt.QtUninvokable private native void loadFromData_native_cref_QByteArray_qtjambireal_QFont_HintingPreference(long __this__nativeId, long fontData, double pixelSize, int hintingPreference); /** *

See QRawFont::loadFromFile(QString,qreal,QFont::HintingPreference)

*/ @io.qt.QtUninvokable public final void loadFromFile(java.lang.String fileName, double pixelSize, io.qt.gui.QFont.HintingPreference hintingPreference){ loadFromFile_native_cref_QString_qtjambireal_QFont_HintingPreference(QtJambi_LibraryUtilities.internal.nativeId(this), fileName, pixelSize, hintingPreference.value()); } @io.qt.QtUninvokable private native void loadFromFile_native_cref_QString_qtjambireal_QFont_HintingPreference(long __this__nativeId, java.lang.String fileName, double pixelSize, int hintingPreference); /** *

See QRawFont::maxCharWidth()const

*/ @io.qt.QtUninvokable public final double maxCharWidth(){ return maxCharWidth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native double maxCharWidth_native_constfct(long __this__nativeId); /** *

See QRawFont::operator==(QRawFont)const

*/ @io.qt.QtUninvokable private final boolean operator_equal(io.qt.gui.QRawFont other){ return operator_equal_native_cref_QRawFont_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @io.qt.QtUninvokable private native boolean operator_equal_native_cref_QRawFont_constfct(long __this__nativeId, long other); /** *

See QRawFont::pathForGlyph(quint32)const

*/ @io.qt.QtUninvokable public final io.qt.gui.QPainterPath pathForGlyph(int glyphIndex){ return pathForGlyph_native_unsigned_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), glyphIndex); } @io.qt.QtUninvokable private native io.qt.gui.QPainterPath pathForGlyph_native_unsigned_int_constfct(long __this__nativeId, int glyphIndex); /** *

See QRawFont::pixelSize()const

*/ @io.qt.QtUninvokable public final double pixelSize(){ return pixelSize_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native double pixelSize_native_constfct(long __this__nativeId); /** *

See QRawFont::setPixelSize(qreal)

*/ @io.qt.QtUninvokable public final void setPixelSize(double pixelSize){ setPixelSize_native_qtjambireal(QtJambi_LibraryUtilities.internal.nativeId(this), pixelSize); } @io.qt.QtUninvokable private native void setPixelSize_native_qtjambireal(long __this__nativeId, double pixelSize); /** *

See QRawFont::style()const

*/ @io.qt.QtUninvokable public final io.qt.gui.QFont.Style style(){ return io.qt.gui.QFont.Style.resolve(style_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int style_native_constfct(long __this__nativeId); /** *

See QRawFont::styleName()const

*/ @io.qt.QtUninvokable public final java.lang.String styleName(){ return styleName_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native java.lang.String styleName_native_constfct(long __this__nativeId); /** *

See QRawFont::supportedWritingSystems()const

*/ @io.qt.QtUninvokable public final io.qt.core.QList supportedWritingSystems(){ return supportedWritingSystems_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.core.QList supportedWritingSystems_native_constfct(long __this__nativeId); /** *

See QRawFont::supportsCharacter(QChar)const

*/ @io.qt.QtUninvokable public final boolean supportsCharacter(char character){ return supportsCharacter_native_QChar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), character); } @io.qt.QtUninvokable private native boolean supportsCharacter_native_QChar_constfct(long __this__nativeId, char character); /** *

See QRawFont::supportsCharacter(uint)const

*/ @io.qt.QtUninvokable public final boolean supportsCharacter(int ucs4){ return supportsCharacter_native_uint_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), ucs4); } @io.qt.QtUninvokable private native boolean supportsCharacter_native_uint_constfct(long __this__nativeId, int ucs4); /** *

See QRawFont::swap(QRawFont&)

*/ @io.qt.QtUninvokable public final void swap(io.qt.gui.QRawFont other){ java.util.Objects.requireNonNull(other, "Argument 'other': null not expected."); swap_native_ref_QRawFont(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @io.qt.QtUninvokable private native void swap_native_ref_QRawFont(long __this__nativeId, long other); /** *

See QRawFont::underlinePosition()const

*/ @io.qt.QtUninvokable public final double underlinePosition(){ return underlinePosition_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native double underlinePosition_native_constfct(long __this__nativeId); /** *

See QRawFont::unitsPerEm()const

*/ @io.qt.QtUninvokable public final double unitsPerEm(){ return unitsPerEm_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native double unitsPerEm_native_constfct(long __this__nativeId); /** *

See QRawFont::weight()const

*/ @io.qt.QtUninvokable public final int weight(){ return weight_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native int weight_native_constfct(long __this__nativeId); /** *

See QRawFont::xHeight()const

*/ @io.qt.QtUninvokable public final double xHeight(){ return xHeight_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native double xHeight_native_constfct(long __this__nativeId); /** *

Overloaded function for {@link #fromFont(io.qt.gui.QFont, io.qt.gui.QFontDatabase.WritingSystem)} * with writingSystem = io.qt.gui.QFontDatabase.WritingSystem.Any.

*/ public static io.qt.gui.QRawFont fromFont(io.qt.gui.QFont font) { return fromFont(font, io.qt.gui.QFontDatabase.WritingSystem.Any); } /** *

See QRawFont::fromFont(QFont,QFontDatabase::WritingSystem)

*/ public static io.qt.gui.QRawFont fromFont(io.qt.gui.QFont font, io.qt.gui.QFontDatabase.WritingSystem writingSystem){ return fromFont_native_cref_QFont_QFontDatabase_WritingSystem(QtJambi_LibraryUtilities.internal.checkedNativeId(font), writingSystem.value()); } private native static io.qt.gui.QRawFont fromFont_native_cref_QFont_QFontDatabase_WritingSystem(long font, int writingSystem); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess protected QRawFont(QPrivateConstructor p) { super(p); } @Override @io.qt.QtUninvokable public boolean equals(Object other) { if (other instanceof io.qt.gui.QRawFont) { return operator_equal((io.qt.gui.QRawFont) 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 public QRawFont clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native QRawFont clone_native(long __this_nativeId); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy