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

system.windows.media.GlyphRun Maven / Gradle / Ivy

/*
 *  MIT License
 *
 *  Copyright (c) 2023 MASES s.r.l.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

/**************************************************************************************
 * 
 *      This code was generated from a template using JCOReflector
 * 
 *      Manual changes to this file may cause unexpected behavior in your application.
 *      Manual changes to this file will be overwritten if the code is regenerated.
 * 
 *************************************************************************************/

package system.windows.media;

import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;

// Import section
import system.Single;
import system.windows.media.GlyphTypeface;
import system.windows.media.textformatting.CharacterHit;
import system.windows.media.Geometry;
import system.windows.Rect;
import system.windows.markup.XmlLanguage;
import system.windows.Point;
import system.componentmodel.ISupportInitialize;
import system.componentmodel.ISupportInitializeImplementation;


/**
 * The base .NET class managing System.Windows.Media.GlyphRun, PresentationCore, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
 * 

* * .NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Windows.Media.GlyphRun *

* * Powered by JCOBridge: more info at https://www.jcobridge.com */ public class GlyphRun extends NetObject implements system.componentmodel.ISupportInitialize { /** * Fully assembly qualified name: PresentationCore, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 */ public static final String assemblyFullName = "PresentationCore, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"; /** * Assembly name: PresentationCore */ public static final String assemblyShortName = "PresentationCore"; /** * Qualified class name: System.Windows.Media.GlyphRun */ public static final String className = "System.Windows.Media.GlyphRun"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { String classToCreate = className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); if (JCOReflector.getDebug()) JCOReflector.writeLog("Creating %s", classToCreate); JCType typeCreated = bridge.GetType(classToCreate); if (JCOReflector.getDebug()) JCOReflector.writeLog("Created: %s", (typeCreated != null) ? typeCreated.toString() : "Returned null value"); return typeCreated; } catch (JCException e) { JCOReflector.writeLog(e); return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * Internal constructor. Use with caution */ public GlyphRun(java.lang.Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public java.lang.Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link GlyphRun}, a cast assert is made to check if types are compatible. * @param from {@link IJCOBridgeReflected} instance to be casted * @return {@link GlyphRun} instance * @throws java.lang.Throwable in case of error during cast operation */ public static GlyphRun cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new GlyphRun(from.getJCOInstance()); } // Constructors section public GlyphRun() throws Throwable, system.PlatformNotSupportedException, system.NotSupportedException, system.ArgumentException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.componentmodel.Win32Exception { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public GlyphRun(Single pixelsPerDip) throws Throwable, system.PlatformNotSupportedException, system.NotSupportedException, system.ArgumentException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.componentmodel.Win32Exception { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(pixelsPerDip == null ? null : pixelsPerDip.getJCOInstance())); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Methods section public double GetDistanceFromCaretCharacterHit(CharacterHit characterHit) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (double)classInstance.Invoke("GetDistanceFromCaretCharacterHit", characterHit == null ? null : characterHit.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Geometry BuildGeometry() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException, system.io.FileNotFoundException, system.UnauthorizedAccessException, system.io.FileFormatException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.FormatException, system.NotSupportedException, system.ArithmeticException, system.ArrayTypeMismatchException, system.componentmodel.Win32Exception { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objBuildGeometry = (JCObject)classInstance.Invoke("BuildGeometry"); return new Geometry(objBuildGeometry); } catch (JCNativeException jcne) { throw translateException(jcne); } } public CharacterHit GetCaretCharacterHitFromDistance(double distance, JCORefOut isInside) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetCaretCharacterHitFromDistance = (JCObject)classInstance.Invoke("GetCaretCharacterHitFromDistance", distance, isInside.getJCRefOut()); return new CharacterHit(objGetCaretCharacterHitFromDistance); } catch (JCNativeException jcne) { throw translateException(jcne); } } public CharacterHit GetNextCaretCharacterHit(CharacterHit characterHit) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetNextCaretCharacterHit = (JCObject)classInstance.Invoke("GetNextCaretCharacterHit", characterHit == null ? null : characterHit.getJCOInstance()); return new CharacterHit(objGetNextCaretCharacterHit); } catch (JCNativeException jcne) { throw translateException(jcne); } } public CharacterHit GetPreviousCaretCharacterHit(CharacterHit characterHit) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objGetPreviousCaretCharacterHit = (JCObject)classInstance.Invoke("GetPreviousCaretCharacterHit", characterHit == null ? null : characterHit.getJCOInstance()); return new CharacterHit(objGetPreviousCaretCharacterHit); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Rect ComputeAlignmentBox() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objComputeAlignmentBox = (JCObject)classInstance.Invoke("ComputeAlignmentBox"); return new Rect(objComputeAlignmentBox); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Rect ComputeInkBoundingBox() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException, system.security.SecurityException, system.io.IOException, system.UnauthorizedAccessException, system.io.FileNotFoundException, system.io.FileFormatException, system.ArithmeticException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objComputeInkBoundingBox = (JCObject)classInstance.Invoke("ComputeInkBoundingBox"); return new Rect(objComputeInkBoundingBox); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToISupportInitialize method available in ISupportInitialize to obtain an object with an invocable method */ @Deprecated public void BeginInit() throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToISupportInitialize to obtain the full interface."); } /** * @deprecated Not for public use because the method is implemented in .NET with an explicit interface. * Use the static ToISupportInitialize method available in ISupportInitialize to obtain an object with an invocable method */ @Deprecated public void EndInit() throws Throwable { throw new UnsupportedOperationException("Not for public use because the method is implemented with an explicit interface. Use ToISupportInitialize to obtain the full interface."); } // Properties section public boolean getIsHitTestable() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("IsHitTestable"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getIsSideways() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("IsSideways"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setIsSideways(boolean IsSideways) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("IsSideways", IsSideways); } catch (JCNativeException jcne) { throw translateException(jcne); } } public double getFontRenderingEmSize() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (double)classInstance.Get("FontRenderingEmSize"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setFontRenderingEmSize(double FontRenderingEmSize) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("FontRenderingEmSize", FontRenderingEmSize); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getBidiLevel() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("BidiLevel"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setBidiLevel(int BidiLevel) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("BidiLevel", BidiLevel); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Single getPixelsPerDip() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("PixelsPerDip"); return new Single(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setPixelsPerDip(Single PixelsPerDip) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("PixelsPerDip", PixelsPerDip == null ? null : PixelsPerDip.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getDeviceFontName() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("DeviceFontName"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setDeviceFontName(java.lang.String DeviceFontName) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("DeviceFontName", DeviceFontName); } catch (JCNativeException jcne) { throw translateException(jcne); } } public XmlLanguage getLanguage() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Language"); return new XmlLanguage(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setLanguage(XmlLanguage Language) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Language", Language == null ? null : Language.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public GlyphTypeface getGlyphTypeface() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("GlyphTypeface"); return new GlyphTypeface(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setGlyphTypeface(GlyphTypeface GlyphTypeface) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("GlyphTypeface", GlyphTypeface == null ? null : GlyphTypeface.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public Point getBaselineOrigin() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("BaselineOrigin"); return new Point(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setBaselineOrigin(Point BaselineOrigin) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.OutOfMemoryException, system.runtime.interopservices.ExternalException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("BaselineOrigin", BaselineOrigin == null ? null : BaselineOrigin.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Instance Events section }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy