GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
TICKIT_RENDERBUFFER_HLINE_AT(3) FreeBSD Library Functions Manual TICKIT_RENDERBUFFER_HLINE_AT(3)

tickit_renderbuffer_hline_at, tickit_renderbuffer_vline_at - create line regions

#include <tickit.h>

void tickit_renderbuffer_hline_at(TickitRenderBuffer *rb,
        int line, int startcol, int endcol,
        TickitLineStyle style, TickitLineCaps caps);
void tickit_renderbuffer_vline_at(TickitRenderBuffer *rb,
        int startline, int endline, int col,
        TickitLineStyle style, TickitLineCaps caps);

Link with -ltickit.

tickit_renderbuffer_hline_at() creates a horizontal line segment on the given line between the given columns; both inclusive. tickit_renderbuffer_vline_at() creates a vertical line segment on the given column between the given lines; both inclusive.

The style argument should be one of the following TickitLineStyle constants:

TICKIT_LINE_SINGLE
A single thin line
TICKIT_LINE_DOUBLE
A pair of double thin lines
TICKIT_LINE_THICK
A single thick line

Note that as line drawing is performed using the Unicode line-drawing characters, not every possible combination of line segments of differing styles meeting in a cell is supported by Unicode. The following sets of styles may be relied upon:

  • Any possible combination of only SINGLE segments, THICK segments, or both.
  • Any combination of only DOUBLE segments, except cells that only have one of the four borders occupied.
  • Any combination of SINGLE and DOUBLE segments except where the style changes between SINGLE to DOUBLE on a vertical or horizontal run.

Other combinations are not directly supported (i.e. any combination of DOUBLE and THICK in the same cell, or any attempt to change from SINGLE to DOUBLE in either the vertical or horizontal direction). To handle these cases, a cell may be rendered with a substitution character which replaces a DOUBLE or THICK segment with a SINGLE one within that cell. The effect will be the overall shape of the line is retained, but close to the edge or corner it will have the wrong segment type.

Conceptually, every cell involved in line drawing has a potential line segment type at each of its four borders to its neighbours. Horizontal lines are drawn though the vertical centre of each cell, and vertical lines are drawn through the horizontal centre.

There is a choice of how to handle the ends of line segments, as to whether the segment should go to the centre of each cell, or should continue through the entire body of the cell and stop at the boundary. By default line segments will start and end at the centre of the cells, so that horizontal and vertical lines meeting in a cell will form a neat corner. When drawing isolated lines such as horizontal or vertical rules, it is preferable that the line go right through the cells at the start and end. To control this behaviour, the caps bitmask argument should be one of the following TickitLineCaps constants:

CAP_START
indicates that the line should consume the entire start cell
CAP_END
indicates that the line should consume the entire end cell
CAP_BOTH
is a convenient shortcut specifying both behaviours

This function returns no value.

tickit_renderbuffer_new(3), tickit_renderbuffer_blit(3), tickit_renderbuffer_flush_to_term(3), tickit_renderbuffer(7), tickit(7)

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.