コード例 #1
0
ファイル: Stroker.cs プロジェクト: jiangzhonghui/SharpFont
        /// <summary><para>
        /// Call this function after <see cref="GetBorderCounts"/> to export the corresponding border to your own
        /// <see cref="Outline"/> structure.
        /// </para><para>
        /// Note that this function appends the border points and contours to your outline, but does not try to resize
        /// its arrays.
        /// </para></summary>
        /// <remarks><para>
        /// Always call this function after <see cref="GetBorderCounts"/> to get sure that there is enough room in your
        /// <see cref="Outline"/> object to receive all new data.
        /// </para><para>
        /// When an outline, or a sub-path, is ‘closed’, the stroker generates two independent ‘border’ outlines, named
        /// ‘left’ and ‘right’.
        /// </para><para>
        /// When the outline, or a sub-path, is ‘opened’, the stroker merges the ‘border’ outlines with caps. The
        /// ‘left’ border receives all points, while the ‘right’ border becomes empty.
        /// </para><para>
        /// Use the function <see cref="Export"/> instead if you want to retrieve all borders at once.
        /// </para></remarks>
        /// <param name="border">The border index.</param>
        /// <param name="outline">The target outline handle.</param>
        public void ExportBorder(StrokerBorder border, Outline outline)
        {
            if (disposed)
                throw new ObjectDisposedException("Stroker", "Cannot access a disposed object.");

            if (outline == null)
                throw new ArgumentNullException("outline");

            FT.FT_Stroker_ExportBorder(Reference, border, outline.Reference);
        }
コード例 #2
0
ファイル: Stroker.cs プロジェクト: jiangzhonghui/SharpFont
        /// <summary>
        /// A convenience function used to parse a whole outline with the stroker. The resulting outline(s) can be
        /// retrieved later by functions like <see cref="GetCounts"/> and <see cref="Export"/>.
        /// </summary>
        /// <remarks><para>
        /// If ‘opened’ is 0 (the default), the outline is treated as a closed path, and the stroker generates two
        /// distinct ‘border’ outlines.
        /// </para><para>
        /// If ‘opened’ is 1, the outline is processed as an open path, and the stroker generates a single ‘stroke’
        /// outline.
        /// </para><para>
        /// This function calls <see cref="Rewind"/> automatically.
        /// </para></remarks>
        /// <param name="outline">The source outline.</param>
        /// <param name="opened">
        /// A boolean. If 1, the outline is treated as an open path instead of a closed one.
        /// </param>
        public void ParseOutline(Outline outline, bool opened)
        {
            if (disposed)
                throw new ObjectDisposedException("Stroker", "Cannot access a disposed object.");

            if (outline == null)
                throw new ArgumentNullException("outline");

            Error err = FT.FT_Stroker_ParseOutline(Reference, outline.Reference, opened);

            if (err != Error.Ok)
                throw new FreeTypeException(err);
        }
コード例 #3
0
ファイル: Outline.cs プロジェクト: none53/SharpFont
		/// <summary>
		/// Copy an outline into another one. Both objects must have the same sizes (number of points &amp; number of
		/// contours) when this function is called.
		/// </summary>
		/// <param name="target">A handle to the target outline.</param>
		public void Copy(Outline target)
		{
			if (disposed)
				throw new ObjectDisposedException("Outline", "Cannot access a disposed object.");

			if (target == null)
				throw new ArgumentNullException("target");

			IntPtr targetRef = target.Reference;
			Error err = FT.FT_Outline_Copy(reference, ref targetRef);
			target.Reference = reference;

			if (err != Error.Ok)
				throw new FreeTypeException(err);
		}
コード例 #4
0
ファイル: Library.cs プロジェクト: jiangzhonghui/SharpFont
 internal void RemoveChildOutline(Outline child)
 {
     childOutlines.Remove(child);
 }
コード例 #5
0
ファイル: Library.cs プロジェクト: jiangzhonghui/SharpFont
 internal void AddChildOutline(Outline child)
 {
     childOutlines.Add(child);
 }
コード例 #6
0
ファイル: Library.cs プロジェクト: Mailaender/SharpFont
 internal void RemoveChildOutline(Outline child)
 {
     childOutlines.Remove(child);
 }
コード例 #7
0
ファイル: Library.cs プロジェクト: Mailaender/SharpFont
 internal void AddChildOutline(Outline child)
 {
     childOutlines.Add(child);
 }