/** RASTER_FP A floating-point anti-aliasing renderer. Graham Asher, August 2016. Most of this code is derived from Raph Levien's font-rs code in the Rust language, which is licensed under the Apache License, version 2.0. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #ifndef RASTER_FP_INCLUDED #define RASTER_FP_INCLUDED #ifdef __cplusplus extern "C" { #endif typedef struct { float m_x; float m_y; } RasterFP_Point; typedef struct { /** The array used to store signed area differences. */ float* m_a; /** The number of elements in m_a. */ int m_a_size; /** The width of the current raster in pixels. */ int m_w; /** The height of the current raster in pixels. */ int m_h; /** The x origin of the raster. */ int m_origin_x; /** The y origin of the raster. */ int m_origin_y; } RasterFP; void RasterFP_Create(RasterFP* aRasterFP); void RasterFP_StartRasterizing(RasterFP* aRasterFP,int aOriginX,int aOriginY,int aWidth,int aHeight); void RasterFP_Destroy(RasterFP* aRasterFP); void RasterFP_DrawLine(RasterFP* aRasterFP,RasterFP_Point aP0,RasterFP_Point aP1); void RasterFP_DrawQuadratic(RasterFP* aRasterFP,RasterFP_Point aP0,RasterFP_Point aP1,RasterFP_Point aP2); void RasterFP_DrawCubic(RasterFP* aRasterFP,RasterFP_Point aP0,RasterFP_Point aP1,RasterFP_Point aP2,RasterFP_Point aP3); void RasterFP_GetBitmap(RasterFP* aRasterFP,unsigned char* aBitmap); #ifdef __cplusplus } // extern "C" #endif #endif