Exemple #1
0
 public void drawLineInternal(
     final UGraphic ug, Stencil stencil, double y, UStroke defaultStroke) {
   stencil = addSkip(stencil);
   final UStroke strokeToUse = style == '\0' ? defaultStroke : getStroke();
   final UGraphic ugStroke = ug.apply(strokeToUse);
   if (title == null) {
     drawHLine(stencil, y, ugStroke);
     return;
   }
   final Dimension2D dimTitle = title.calculateDimension(ug.getStringBounder());
   drawHLine(firstHalf(stencil, dimTitle.getWidth()), y, ugStroke);
   final double startingX = stencil.getStartingX(ug.getStringBounder(), y);
   final double endingX = stencil.getEndingX(ug.getStringBounder(), y);
   drawTitleInternal(ug, startingX, endingX, y, false);
   drawHLine(secondHalf(stencil, dimTitle.getWidth()), y, ugStroke);
 }
Exemple #2
0
 private static void drawSimpleHline(UGraphic ug, Stencil stencil, double y) {
   final double startingX = stencil.getStartingX(ug.getStringBounder(), y);
   final double endingX = stencil.getEndingX(ug.getStringBounder(), y);
   ug.apply(new UTranslate(startingX, y)).draw(new ULine(endingX - startingX, 0));
 }