IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30603


Ignore:
Timestamp:
Feb 13, 2011, 11:10:40 AM (15 years ago)
Author:
eugene
Message:

single-quote protects against special chars in string for kapa labels

Location:
trunk/Ohana/src/libkapa/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libkapa/src/DrawRotString.c

    r10073 r30603  
    2727  unsigned char *bitmap;
    2828  char *currentname, basename[64];
    29   int i, dy, dx, N, X, Y, code;
     29  int i, dy, dx, N, X, Y, code, protect;
    3030  int dX, Xoff, dY, Yoff, YoffBase;
    3131  int currentsize, basesize;
     
    6363
    6464  code = FALSE;
     65  protect = FALSE;
    6566
    6667  YoffBase = Yoff;
     
    7071    if ((N < 0) || (N >= NROTCHARS)) continue;
    7172
     73    if (N == 39) { // single-quote
     74      protect = protect ? FALSE : TRUE;
     75    }
     76
    7277    /* check for special characters */
    73     if (!code) {
     78    if (!code && !protect) {
    7479      if (N == 94) {
    7580        SetRotFont (currentname, (int)(0.8*currentsize));
  • trunk/Ohana/src/libkapa/src/PSRotFont.c

    r10073 r30603  
    77
    88  char *segment, basename[64], *currentname;
    9   int i, N, code;
     9  int i, N, code, protect;
    1010  int dX, dY, Xoff, Yoff, X, Y, Nseg, NSEG, YoffBase;
    1111  double cs, sn, fscale, currentscale;
     
    6060
    6161  code = FALSE;
     62  protect = FALSE;
     63
    6264  YoffBase = 0;
    6365  /* accumulate string segments with common state */
     
    6668    if ((N < 0) || (N >= NROTCHARS)) continue;
    6769
     70    if (N == 39) { // single-quote
     71      protect = protect ? FALSE : TRUE;
     72    }
     73
    6874    /* check for special characters */
    69     if (!code) {
     75    if (!code && !protect) {
    7076      /* superscript character (^) */
    7177      if (N == 94) {
  • trunk/Ohana/src/libkapa/src/bDrawRotFont.c

    r29938 r30603  
    1414  unsigned char *bitmap;
    1515  char *currentname, basename[64];
    16   int i, dy, dx, N, X, Y, code;
     16  int i, dy, dx, N, X, Y, code, protect;
    1717  int dX, Xoff, dY, Yoff, YoffBase;
    1818  int currentsize, basesize;
     
    5353
    5454  code = FALSE;
     55  protect = FALSE;
    5556
    5657  YoffBase = Yoff;
     
    6061    if ((N < 0) || (N >= NROTCHARS)) continue;
    6162
     63    if (N == 39) { // single-quote
     64      protect = protect ? FALSE : TRUE;
     65    }
     66
    6267    /* check for special characters */
    63     if (!code) {
     68    if (!code && !protect) {
    6469      if (N == 94) {
    6570        SetRotFont (currentname, (int)(0.8*currentsize));
Note: See TracChangeset for help on using the changeset viewer.