pdf_stream_writer Derived Type

type, public, extends(vector_stream_writer) :: pdf_stream_writer


Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: content_stream
type(vector_graphics_state), public :: current_state

Type-Bound Procedures

procedure, public :: initialize_stream => initialize_vector_stream

  • private subroutine initialize_vector_stream(this)

    Arguments

    Type IntentOptional Attributes Name
    class(vector_stream_writer), intent(inout) :: this

procedure, public :: add_to_stream => add_to_vector_stream

  • private subroutine add_to_vector_stream(this, command)

    Arguments

    Type IntentOptional Attributes Name
    class(vector_stream_writer), intent(inout) :: this
    character(len=*), intent(in) :: command

procedure, public :: draw_vector_line => draw_generic_vector_line

  • private subroutine draw_generic_vector_line(this, x1, y1, x2, y2)

    Arguments

    Type IntentOptional Attributes Name
    class(vector_stream_writer), intent(inout) :: this
    real(kind=wp), intent(in) :: x1
    real(kind=wp), intent(in) :: y1
    real(kind=wp), intent(in) :: x2
    real(kind=wp), intent(in) :: y2

procedure, public :: set_vector_color => set_generic_vector_color

  • private subroutine set_generic_vector_color(this, r, g, b)

    Arguments

    Type IntentOptional Attributes Name
    class(vector_stream_writer), intent(inout) :: this
    real(kind=wp), intent(in) :: r
    real(kind=wp), intent(in) :: g
    real(kind=wp), intent(in) :: b

procedure, public :: set_vector_line_width => set_generic_vector_line_width

  • private subroutine set_generic_vector_line_width(this, width)

    Arguments

    Type IntentOptional Attributes Name
    class(vector_stream_writer), intent(inout) :: this
    real(kind=wp), intent(in) :: width

procedure, public :: write_command => pdf_write_command

  • private subroutine pdf_write_command(this, command)

    Write PDF graphics command to stream

    Arguments

    Type IntentOptional Attributes Name
    class(pdf_stream_writer), intent(inout) :: this
    character(len=*), intent(in) :: command

procedure, public :: write_move => pdf_write_move

  • private subroutine pdf_write_move(this, x, y)

    Write PDF move command with robust validation Validates coordinates and handles NaN, infinity gracefully Logs debug information when corrections are applied

    Arguments

    Type IntentOptional Attributes Name
    class(pdf_stream_writer), intent(inout) :: this
    real(kind=wp), intent(in) :: x
    real(kind=wp), intent(in) :: y

procedure, public :: write_line => pdf_write_line

  • private subroutine pdf_write_line(this, x, y)

    Write PDF line command with robust validation Validates coordinates and handles NaN, infinity gracefully Logs debug information when corrections are applied

    Arguments

    Type IntentOptional Attributes Name
    class(pdf_stream_writer), intent(inout) :: this
    real(kind=wp), intent(in) :: x
    real(kind=wp), intent(in) :: y

procedure, public :: write_stroke => pdf_write_stroke

  • private subroutine pdf_write_stroke(this)

    Write PDF stroke command

    Arguments

    Type IntentOptional Attributes Name
    class(pdf_stream_writer), intent(inout) :: this

procedure, public :: write_color => pdf_write_color

  • private subroutine pdf_write_color(this, r, g, b)

    Write PDF color command with robust validation Validates and clamps RGB values to [0.0, 1.0] range Handles NaN, infinity, and out-of-range values gracefully Logs debug information when corrections are applied

    Arguments

    Type IntentOptional Attributes Name
    class(pdf_stream_writer), intent(inout) :: this
    real(kind=wp), intent(in) :: r
    real(kind=wp), intent(in) :: g
    real(kind=wp), intent(in) :: b

procedure, public :: write_line_width => pdf_write_line_width

  • private subroutine pdf_write_line_width(this, width)

    Write PDF line width command with robust validation Validates width > 0 and handles NaN, infinity gracefully Logs debug information when corrections are applied

    Arguments

    Type IntentOptional Attributes Name
    class(pdf_stream_writer), intent(inout) :: this
    real(kind=wp), intent(in) :: width

procedure, public :: save_state => pdf_save_state

  • private subroutine pdf_save_state(this)

    Write PDF save graphics state command

    Arguments

    Type IntentOptional Attributes Name
    class(pdf_stream_writer), intent(inout) :: this

procedure, public :: restore_state => pdf_restore_state

  • private subroutine pdf_restore_state(this)

    Write PDF restore graphics state command

    Arguments

    Type IntentOptional Attributes Name
    class(pdf_stream_writer), intent(inout) :: this