Structured Printing Structured Printing
By Keiji Ikuta(Jul. 5, 2001)
 H > P > this page: bottom (Group)
KWLib has a mechanism to print structured string.
To write fractional, the program code looks like below:

  s="";
  KPIC_BEGIN(s,"FRC");
  s<<"x";
  KPIC_SEP(s);
  s<<"y";
  KPIC_END(s);
  s<<"xyzText";
  PrintEx(kdc,KPoint(x,y),s,kpi);

To write complicated fractional, the program code is like:

  s="a";
  KPIC_BEGIN(s,"FRC");
    KPIC_BEGIN(s,"FRC");
      s<<"a";
    KPIC_SEP(s);
      s<<"b";
    KPIC_END(s);
  KPIC_SEP(s);
    s<<"a+";
    KPIC_BEGIN(s,"FRC");
      s<<"x";
    KPIC_SEP(s);
      s<<"y";
    KPIC_END(s);
  KPIC_END(s);
  s<<"b";
  PrintEx(kdc,KPoint(x,y),s,kpi);


Other samples
Valid HTML 4.01!Valid CSS!