示例#1
0
        /// <summary>
        /// Get a module's property value.
        /// </summary>
        /// <param name="moduleName">The module name.</param>
        /// <param name="propertyName">The property name. Properties are described in the ‘Synopsis’ subsection of the
        /// module's documentation.</param>
        /// <param name="value">A generic pointer to a variable or structure which gives the value of the property. The
        /// exact definition of ‘value’ is dependent on the property; see the ‘Synopsis’ subsection of the module's
        /// documentation.</param>
        public void PropertyGet(string moduleName, string propertyName, out GlyphToScriptMapProperty value)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("Library", "Cannot access a disposed object.");
            }

            IntPtr ptr;
            Error  err = FT.FT_Property_Get(Reference, moduleName, propertyName, out ptr);

            GlyphToScriptMapPropertyRec ptrRec = PInvokeHelper.PtrToStructure <GlyphToScriptMapPropertyRec>(ptr);
            Face face = childFaces.Find(f => f.Reference == ptrRec.face);

            value = new GlyphToScriptMapProperty(ptrRec, face);
        }
示例#2
0
        /// <summary>
        /// Set a property for a given module.
        /// </summary>
        /// <param name="moduleName">The module name.</param>
        /// <param name="propertyName"><para>The property name. Properties are described in the ‘Synopsis’ subsection
        /// of the module's documentation.
        /// </para><para>
        /// Note that only a few modules have properties.</para></param>
        /// <param name="value">A generic pointer to a variable or structure which gives the new value of the property.
        /// The exact definition of ‘value’ is dependent on the property; see the ‘Synopsis’ subsection of the module's
        /// documentation.</param>
        public unsafe void PropertySet(string moduleName, string propertyName, GlyphToScriptMapProperty value)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("Library", "Cannot access a disposed object.");
            }

            GlyphToScriptMapPropertyRec rec = value.Rec;
            Error err = FT.FT_Property_Set(Reference, moduleName, propertyName, (IntPtr)(&rec));

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }
        }
示例#3
0
 public void PropertyGet(string moduleName, string propertyName, out GlyphToScriptMapProperty value)
 {
     value = PropertyGetGlyphToScriptMap(moduleName, propertyName);
 }
示例#4
0
        /// <summary>
        /// Set a property for a given module.
        /// </summary>
        /// <param name="moduleName">The module name.</param>
        /// <param name="propertyName"><para>The property name. Properties are described in the ‘Synopsis’ subsection
        /// of the module's documentation.
        /// </para><para>
        /// Note that only a few modules have properties.</para></param>
        /// <param name="value">A generic pointer to a variable or structure which gives the new value of the property.
        /// The exact definition of ‘value’ is dependent on the property; see the ‘Synopsis’ subsection of the module's
        /// documentation.</param>
        public void PropertySet(string moduleName, string propertyName, GlyphToScriptMapProperty value)
        {
            var rec = value.Rec;

            PropertySet(moduleName, propertyName, ref rec);
        }