GE_ROUND_CAP: Symbolic Constants for line endings and line joins

Description Usage Format Source Examples

Description

These R values are symbolic constants that provide conceptual names for specific values used in C code. These control the appearance of the join between two lines rendered on a graphics device and also how the end of a line appears.

These symbolic constants correspond to enumerated constants in C code.

Usage

1

Format

These are objects of class R_GE_lineend or R_GE_linejoin.

Source

The R Graphics Engine code.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
  line = function(x1, y1, x2, y2, gcontext, dev) {
           # Use the value
      if(gcontext@lend == GE_ROUND_CAP) {
         
      } else if(gcontext@lend == GE_BUTT_CAP) {

      } else if(gcontext@lend == GE_SQUARE_CAP) {

      }

          # Use the name.
      switch(names(gcontext@ljoin),
             "GE_BEVEL_JOIN" = "bevel",
             "GE_MITRE_JOIN" = "mitre",
             "GE_ROUND_JOIN" = "round")
  }

omegahat/RGraphicsDevice documentation built on Jan. 18, 2022, 4:37 a.m.