Example #1
0
        /// <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 (outline == null)
            {
                throw new ArgumentNullException("outline");
            }

            FT.FT_Stroker_ExportBorder(Reference, border, outline.Reference);
        }
Example #2
0
        /// <summary>
        /// Call this function once you have finished parsing your paths with the stroker. It returns the number of
        /// points and contours necessary to export one of the ‘border’ or ‘stroke’ outlines generated by the stroker.
        /// </summary>
        /// <remarks><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="GetCounts"/> instead if you want to retrieve the counts associated to both
        /// borders.
        /// </para></remarks>
        /// <param name="border">The border index.</param>
        /// <param name="pointsCount">The number of points.</param>
        /// <param name="contoursCount">The number of contours.</param>
        public void GetBorderCounts(StrokerBorder border, out uint pointsCount, out uint contoursCount)
        {
            Error err = FT.FT_Stroker_GetBorderCounts(Reference, border, out pointsCount, out contoursCount);

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }
        }
Example #3
0
        /// <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);
        }
Example #4
0
        public void GetBorderCounts(StrokerBorder border, out uint pointsCount, out uint contoursCount)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("Stroker", "Cannot access a disposed object.");
            }

            Error err = FT.FT_Stroker_GetBorderCounts(Reference, border, out pointsCount, out contoursCount);

            if (err != Error.Ok)
            {
                throw new FreeTypeException(err);
            }
        }
Example #5
0
        public void GetBorderCounts(StrokerBorder border, out uint pointsCount, out uint contoursCount)
        {
            if (disposed)
                throw new ObjectDisposedException("Stroker", "Cannot access a disposed object.");

            Error err = FT.FT_Stroker_GetBorderCounts(Reference, border, out pointsCount, out contoursCount);

            if (err != Error.Ok)
                throw new FreeTypeException(err);
        }
Example #6
0
        /// <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);
        }
Example #7
0
 internal static extern void FT_Stroker_ExportBorder(IntPtr stroker, StrokerBorder border, IntPtr outline);
Example #8
0
 internal static extern Error FT_Stroker_GetBorderCounts(IntPtr stroker, StrokerBorder border, out uint anum_points, out uint anum_contours);
Example #9
0
 public static extern void FT_Stroker_ExportBorder(IntPtr stroker, StrokerBorder border, ref Outline outline);
Example #10
0
 internal static extern Error FT_Stroker_GetBorderCounts(IntPtr stroker, StrokerBorder border, out uint anum_points, out uint anum_contours);
Example #11
0
 internal static extern void FT_Stroker_ExportBorder(IntPtr stroker, StrokerBorder border, IntPtr outline);