public Outline(Library library, uint pointsCount, int contoursCount) { IntPtr reference; Error err = FT.FT_Outline_New(library.Reference, pointsCount, contoursCount, out reference); if (err != Error.Ok) throw new FreeTypeException(err); parentLibrary = library; parentLibrary.AddChildOutline(this); }
public Outline(Library library, uint pointsCount, int contoursCount) { IntPtr reference; Error err = FT.FT_Outline_New(library.Reference, pointsCount, contoursCount, out reference); if (err != Error.Ok) { throw new FreeTypeException(err); } parentLibrary = library; parentLibrary.AddChildOutline(this); }
/// <summary> /// Initializes a new instance of the <see cref="Outline"/> class. /// </summary> /// <remarks> /// The reason why this function takes a ‘library’ parameter is simply to use the library's memory allocator. /// </remarks> /// <param name="library"> /// A handle to the library object from where the outline is allocated. Note however that the new outline will /// not necessarily be freed, when destroying the library, by <see cref="Library.Finalize"/>. /// </param> /// <param name="pointsCount">The maximum number of points within the outline.</param> /// <param name="contoursCount">The maximum number of contours within the outline.</param> public Outline(Library library, uint pointsCount, int contoursCount) : base(NewOutline(library, pointsCount, contoursCount)) { parentLibrary = library; parentLibrary.AddChildOutline(this); }
internal Outline(IntPtr reference, Library parent) { Reference = reference; parentLibrary = parent; parentLibrary.AddChildOutline(this); }