Skip to content

Commit

Permalink
Improved typographic marks
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgy Litvinov committed Oct 27, 2016
1 parent 12f3f3f commit 977a508
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions src/main/java/ru/ras/iph/impose/ImposeonA3.java
Original file line number Diff line number Diff line change
Expand Up @@ -307,19 +307,23 @@ private static void drawFoldLines(PdfContentByte canvas) {

}
private static void drawRectangle2(PdfContentByte canvas){
canvas.moveTo(782,587);
canvas.lineTo(782,604);
canvas.lineTo(807,604);
canvas.lineTo(807,587);
int startX = 782;
int startY = 587;
canvas.moveTo(startX,startY);
canvas.lineTo(startX,startY+17);
canvas.lineTo(startX+25,startY+17);
canvas.lineTo(startX+25,startY);
canvas.closePath();
canvas.fillStroke();
canvas.stroke();
}
private static void drawRectangle4(PdfContentByte canvas){
canvas.moveTo(413,60);
canvas.lineTo(430,60);
canvas.lineTo(430,35);
canvas.lineTo(413,35);
int startX = 413;
int startY = 590;
canvas.moveTo(startX,startY);
canvas.lineTo(startX+17,startY);
canvas.lineTo(startX+17,startY-25);
canvas.lineTo(startX,startY-25);
canvas.closePath();
canvas.fillStroke();
canvas.stroke();
Expand All @@ -328,8 +332,8 @@ private static void drawRectangle4(PdfContentByte canvas){
private static void drawSerifs4(PdfContentByte canvas, int layout) {
float xl = 413f;
float xr = 430f;
int startY = 590;
int endY = 90;
int startY = 555;
int endY = 50;
int spacing = 28;
float inc = 2.8f;
int countSpaces = Math.abs(startY - endY) / spacing + 1;
Expand All @@ -346,18 +350,19 @@ private static void drawSerifs4(PdfContentByte canvas, int layout) {
private static void drawSerifs2(PdfContentByte canvas, int layout) {
float yt = 587f;
float yb = 604f;
int startX = 40;
int endX = 750;
int startX = 772;
int endX = 50;
int spacing = 28;
float inc = 2.8f;
int countSpaces = Math.abs(startX - endX) / spacing + 1;
int position = (layout / 2) % countSpaces;
int countSerifs = layout / (2 * countSpaces);
for (int i = 0; i <= countSerifs; i++) {
canvas.moveTo(startX + position * spacing + i * inc, yt);
canvas.lineTo(startX + position * spacing + i * inc, yb);
canvas.moveTo(startX - position * spacing - i * inc, yt);
canvas.lineTo(startX - position * spacing - i * inc, yb);
}
canvas.stroke();
}

}

0 comments on commit 977a508

Please sign in to comment.