fortplot_tt_scanline_fill Module

Scanline coverage helpers for the TrueType analytical antialias rasterizer. Split from fortplot_tt_rasterizer to keep that module under the size limit.



Derived Types

type, public ::  tt_active_edge_t

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: fx
real(kind=dp), public :: fdx
real(kind=dp), public :: fdy
real(kind=dp), public :: direction
real(kind=dp), public :: sy
real(kind=dp), public :: ey

Functions

public function new_active_edge(e, off_x, start_point) result(ae)

Arguments

Type IntentOptional Attributes Name
type(tt_edge_t), intent(in) :: e
integer, intent(in) :: off_x
real(kind=dp), intent(in) :: start_point

Return Value type(tt_active_edge_t)


Subroutines

public subroutine fill_active_edges(scanline, scanline2, w, active, num_active, y_top)

Fill scanline coverage from active edges. Port of stbtt__fill_active_edges_new. scanline is 0-based [0..w-1], scanline2 is 0-based [0..w]. In STB, fill function receives scanline_fill = scanline2+1. Here scanline2(k+1) = STB's scanline_fill[k].

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout) :: scanline(0:)
real(kind=dp), intent(inout) :: scanline2(0:)
integer, intent(in) :: w
type(tt_active_edge_t), intent(in) :: active(:)
integer, intent(in) :: num_active
real(kind=dp), intent(in) :: y_top