Line Widget

The LINE widget allows you to draw lines on Appx screens and PDF reports. You have control over the line Color, Weight, End Caps, and Stroke Pattern.


Overview:

The Appx Line widget allows you to draw a straight line between any two endpoints. You have complete control over the line weight, the line color, how the endcaps are rendered, the stroke pattern used, the offset of the stroke pattern, and the base units used to calculate these values. The values are given as a percentage of the base unit. The default base unit is the height of a grid cell on the screen or output page. Due to space considerations in the current WIDGET file, the most used appearance options are specificed as specifications on the Widget definition screen. The lesser used options are specified as @ macros entered into the Label or Tooltip widget fields.

Usage:

Widget Screen Specifications:

* Line Weight - A number specifying the percentage of the base unit defining the width of the line. The default base unit is the height of a grid cell. The default line weight is 32.

* Line Color - The color of the line is standard Appx RGB values. This is stored in the same WIDGET fields as Border Foreground color. In the WIDGET record that is in the WIDGET COLOR DB FG fields.

* Endcaps - This determines how line ends are drawn. They can be NONE, ROUND, or SQUARE. NONE and SQUARE look very similar. They are actually both square. The difference is that NONE squares the end off at the edge of the grid cell. SQUARE extends the endcap past the end of the line. This makes a different when you butt up to lines at a 90 degree angle. SQUARE creates a nice square corner. NONE creates a messy corner. ROUND creates a nice corner no matter what angle two lines meet.

@ Macro Specification:

* Unit Base - @SLUB=[ W | H | # ] The unit base setting takes one of three values. A value of W sets the unit base to the current Width of a grid cell. A value of H sets teh unit base to the current Height of a grid cell. A numeric value sets the unit base to that exact number of pixels. The advantage of using W or H is that if you scale your screen or page, the line weight and stroke pattern will scale proportionally. if you use a numeric pixel value that is what you will get.

* Stroke Pattern - @SSP=#,#,... The stroke pattern if not set assumes a solid line. If set you must give a list of numeric pairs as a comma separated list. The pairs tell the line widget how man units to draw the line then how man units to draw the gap. The pattern will repeat for the length of the line. You can specifiy an unlimited number of Draw,Gap pairs to get an array of line patterns. The units are specified as a percentage of the page unit. Note: If you define and endcap other than NONE, the endcap will be drawn into the gap area and will make the drawn segments look longer and the gap segments look shorter.

* Stroke Pattern Offset - @SSPO=# The stroke pattern offset tells the line widget to start drawning the stroke pattern partially into the pattern instead of at the beginning of the pattern. This can help you even out the appearance of how the pattern starts and ends to look more symertrical.

Comments:

Read what other users have said about this page or add your own comments.


-- PeteBrower - 2012-03-16

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2012-03-26 - PeteBrower
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback