/// <summary> /// Render an outline within a bitmap using the current scan-convert. This function uses an /// <see cref="RasterParams"/> structure as an argument, allowing advanced features like direct composition, /// translucency, etc. /// </summary> /// <remarks><para> /// You should know what you are doing and how <see cref="RasterParams"/> works to use this function. /// </para><para> /// The field ‘params.source’ will be set to ‘outline’ before the scan converter is called, which means that /// the value you give to it is actually ignored. /// </para><para> /// The gray-level rasterizer always uses 256 gray levels. If you want less gray levels, you have to provide /// your own span callback. See the <see cref="RasterFlags.Direct"/> value of the ‘flags’ field in the /// <see cref="RasterParams"/> structure for more details. /// </para></remarks> /// <param name="parameters"> /// A pointer to an <see cref="RasterParams"/> structure used to describe the rendering operation. /// </param> public void Render(RasterParams parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } Error err = FT.FT_Outline_Render(parentLibrary.Reference, Reference, parameters.Reference); if (err != Error.Ok) { throw new FreeTypeException(err); } }
/// <summary> /// Render an outline within a bitmap using the current scan-convert. This function uses an /// <see cref="RasterParams"/> structure as an argument, allowing advanced features like direct composition, /// translucency, etc. /// </summary> /// <remarks><para> /// You should know what you are doing and how <see cref="RasterParams"/> works to use this function. /// </para><para> /// The field ‘params.source’ will be set to ‘outline’ before the scan converter is called, which means that /// the value you give to it is actually ignored. /// </para><para> /// The gray-level rasterizer always uses 256 gray levels. If you want less gray levels, you have to provide /// your own span callback. See the <see cref="RasterFlags.Direct"/> value of the ‘flags’ field in the /// <see cref="RasterParams"/> structure for more details. /// </para></remarks> /// <param name="parameters"> /// A pointer to an <see cref="RasterParams"/> structure used to describe the rendering operation. /// </param> public void Render(RasterParams parameters) { if (disposed) { throw new ObjectDisposedException("Outline", "Cannot access a disposed object."); } if (parameters == null) { throw new ArgumentNullException("parameters"); } Error err = FT.FT_Outline_Render(parentLibrary.Reference, reference, parameters.Reference); if (err != Error.Ok) { throw new FreeTypeException(err); } }
/// <summary> /// Render an outline within a bitmap using the current scan-convert. This function uses an /// <see cref="RasterParams"/> structure as an argument, allowing advanced features like direct composition, /// translucency, etc. /// </summary> /// <remarks><para> /// You should know what you are doing and how <see cref="RasterParams"/> works to use this function. /// </para><para> /// The field ‘params.source’ will be set to ‘outline’ before the scan converter is called, which means that /// the value you give to it is actually ignored. /// </para><para> /// The gray-level rasterizer always uses 256 gray levels. If you want less gray levels, you have to provide /// your own span callback. See the <see cref="RasterFlags.Direct"/> value of the ‘flags’ field in the /// <see cref="RasterParams"/> structure for more details. /// </para></remarks> /// <param name="library">A handle to a FreeType library object.</param> /// <param name="parameters"> /// A pointer to an <see cref="RasterParams"/> structure used to describe the rendering operation. /// </param> public void Render(Library library, RasterParams parameters) { if (disposed) throw new ObjectDisposedException("Outline", "Cannot access a disposed object."); if (library == null) throw new ArgumentNullException("library"); if (parameters == null) throw new ArgumentNullException("parameters"); Error err = FT.FT_Outline_Render(library.Reference, reference, parameters.Reference); if (err != Error.Ok) throw new FreeTypeException(err); }