This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.event.ActionListener; | |
import java.awt.event.ActionEvent; | |
import java.awt.Component; | |
import java.awt.Container; | |
import java.awt.Dimension; | |
import java.awt.Insets; | |
import javax.swing.Box; | |
import javax.swing.BoxLayout; | |
import javax.swing.DefaultListModel; | |
import javax.swing.JButton; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.BorderLayout; | |
import java.awt.GraphicsConfigTemplate; | |
import java.awt.GraphicsDevice; | |
import java.awt.GraphicsEnvironment; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.awt.event.WindowAdapter; | |
import java.awt.event.WindowEvent; | |
import java.awt.image.BufferedImage; | |
import java.awt.image.RenderedImage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module Prawn | |
Class Document | |
def draw_crop_marks(spacing, margin, lineweight) | |
#crop mark line thickness | |
line_width(lineweight) | |
#spacing = 2.125 | |
#margin = 9 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'prawn' | |
Prawn::Document.generate('crop-marks.pdf') do | |
spacing = 12 | |
margin = 100 | |
canvas do | |
# topleft corner | |
stroke_line [bounds.left + spacing, bounds.top - margin], | |
[bounds.left + margin - spacing, bounds.top - margin] |
NewerOlder