Module ep_panel

License: MIT File: ep_panel.erl Description: Create panel map.

Copyright © 2018 Lloyd R. Prentice

Version: .01

Authors: Lloyd R. Prentice.

Description

License: MIT File: ep_panel.erl Description: Create panel map

Panels wrap boxes (ep_box.erl) in tupleis to facilitate page design and layout functions

Panels "contain" content elements, either text or images.

Sets of panels are composed into a "page grids" to organize content and direct "eye path."

Position = {X,Y} X = upper left X coordinate of panel in points Y = upper left Y coordinate of panel in points Size = {Width, Height} Width = width of box in points Height = height of box in pnts id = {page number, panel index, name}

IMPORTANT NOTE:

PDF assumes that 0, 0 XY coordinates are at lower-left This seems unnatural for folks who read top-to_bottom So for convenience, we'll assume that 0, 0 XY is at upper-left of the panel. This means that y will have to be inverted relative to paper stock height when we print.

Function Index

break/1Advance content cursor (NextLine) in panel.
consumed/2Return vertical space in panel consumed by lines.
create/3Create panel map.
default_panel/0Create default panel.
get_available/1Return available space in panel in pixels (remaining to the bottom).
get_available_lines/3Given tag, return available lines in panel.
get_border/1Get border.
get_border_color/1Get border color.
get_border_style/1Get border style.
get_content_cursor/1Get next line.
get_id/1Get panel id.
get_indent/1Get indent.
get_jump_prompt/1Get jump prompt.
get_li_fill/1Get li fill color.
get_margin/1Get margin.
get_measure/1Get measure.
get_name_string/1Get panel name as string: PageNumber-PanelIndex-"PanelName".
get_page_number/1Get page number.
get_panel_index/1Get panel index.
get_panel_name/1Get panel name.
get_position/1Get position.
get_radius/1Get radius.
get_rot/1Get rot; text rotation angle.
get_size/1Get size.
get_text_position/1Get text position.
get_typestyle/1Get typestyle.
one_line_space/3Update content cursor by one line.
panel/3
reveal/1Make panelmap displayable.
update_background_color/2Update background color.
update_border/2Update border.
update_border_color/2Update border color.
update_border_style/2Update border style.
update_content_cursor/2Update next line.
update_id/2Update panel id.
update_jump_prompt/2Update jump prompt.
update_li_fill/2Update li fill color.
update_margin/2Update margin.
update_panel/3Update content cursor (NextLine) in panel.
update_position/2Update position.
update_radius/2Update radius.
update_rot/2Update rot.
update_size/2Update size.
update_typestyle/2Update typestyle.
will_fit/3Returns true if lines fit in panel.

Function Details

break/1

break(PanelMap::ep_panel()) -> ep_panel()

Advance content cursor (NextLine) in panel

consumed/2

consumed(Tag::atom(), Lines::list()) -> integer()

Return vertical space in panel consumed by lines

create/3

create(ID::ep_panel_id(), Position::xy(), Size::xy()) -> ep_panel()

Create panel map

default_panel/0

default_panel() -> ep_panel()

Create default panel

get_available/1

get_available(X1::ep_panel()) -> integer()

Return available space in panel in pixels (remaining to the bottom).

get_available_lines/3

get_available_lines(TypeStyle::atom(), Tag::atom(), PanelMap::ep_panel()) -> integer()

Given tag, return available lines in panel

get_border/1

get_border(X1::ep_panel()) -> any()

Get border

get_border_color/1

get_border_color(X1::ep_panel()) -> color()

Get border color

get_border_style/1

get_border_style(X1::ep_panel()) -> atom()

Get border style

get_content_cursor/1

get_content_cursor(X1::ep_panel()) -> points()

Get next line

get_id/1

get_id(X1::ep_panel()) -> ep_panel_id()

Get panel id

get_indent/1

get_indent(X1::ep_panel()) -> points()

Get indent

get_jump_prompt/1

get_jump_prompt(X1::ep_panel()) -> string()

Get jump prompt

get_li_fill/1

get_li_fill(X1::ep_panel()) -> color()

Get li fill color

get_margin/1

get_margin(X1::ep_panel()) -> points()

Get margin

get_measure/1

get_measure(X1::ep_panel()) -> integer()

Get measure

get_name_string/1

get_name_string(X1::ep_panel()) -> string()

Get panel name as string: PageNumber-PanelIndex-"PanelName"

get_page_number/1

get_page_number(X1::ep_panel()) -> integer()

Get page number

get_panel_index/1

get_panel_index(X1::ep_panel()) -> integer()

Get panel index

get_panel_name/1

get_panel_name(X1::ep_panel()) -> string()

Get panel name

get_position/1

get_position(X1::ep_panel()) -> xy()

Get position

get_radius/1

get_radius(X1::ep_panel()) -> number()

Get radius

get_rot/1

get_rot(X1::ep_panel()) -> number()

Get rot; text rotation angle

get_size/1

get_size(X1::ep_panel()) -> xy()

Get size

get_text_position/1

get_text_position(X1::ep_panel()) -> xy()

Get text position

get_typestyle/1

get_typestyle(X1::ep_panel()) -> atom()

Get typestyle

one_line_space/3

one_line_space(Tag::atom(), TypeStyle::atom(), PanelMap::ep_panel()) -> ep_panel()

Update content cursor by one line

panel/3

panel(PDF::pdf_server_pid(), Job::ep_job(), PanelMap::ep_panel()) -> ok

reveal/1

reveal(PanelMap::ep_panel()) -> ep_panel()

Make panelmap displayable

update_background_color/2

update_background_color(BackgroundColor::color(), PanelMap::ep_panel()) -> ep_panel()

Update background color

update_border/2

update_border(Border::number(), PanelMap::ep_panel()) -> ep_panel()

Update border

update_border_color/2

update_border_color(BorderColor::color(), PanelMap::ep_panel()) -> ep_panel()

Update border color

update_border_style/2

update_border_style(BorderStyle::atom(), PanelMap::ep_panel()) -> ep_panel()

Update border style

update_content_cursor/2

update_content_cursor(Pixels::points(), PanelMap::ep_panel()) -> ep_panel()

Update next line

update_id/2

update_id(Id::ep_panel_id(), PanelMap::ep_panel()) -> ep_panel()

Update panel id

update_jump_prompt/2

update_jump_prompt(JumpPrompt::string(), PanelMap::ep_panel()) -> ep_panel()

Update jump prompt

update_li_fill/2

update_li_fill(LiFill::atom(), PanelMap::ep_panel()) -> ep_panel()

Update li fill color

update_margin/2

update_margin(Margin::points(), PanelMap::ep_panel()) -> ep_panel()

Update margin

update_panel/3

update_panel(Tag::atom(), Lines::list(), PanelMap::ep_panel()) -> ep_panel()

Update content cursor (NextLine) in panel

update_position/2

update_position(Position::xy(), PanelMap::ep_panel()) -> ep_panel()

Update position

update_radius/2

update_radius(Radius::points(), PanelMap::ep_panel()) -> ep_panel()

Update radius

update_rot/2

update_rot(Rot::number(), PanelMap::ep_panel()) -> ep_panel()

Update rot

update_size/2

update_size(Size::xy(), PanelMap::ep_panel()) -> ep_panel()

Update size

update_typestyle/2

update_typestyle(TypeStyle::atom(), PanelMap::ep_panel()) -> ep_panel()

Update typestyle

will_fit/3

will_fit(Tag::atom(), Lines::list(), PanelMap::ep_panel()) -> boolean()

Returns true if lines fit in panel


Generated by EDoc