This is where the bulk of the work is. This service renders out the preview images bit by bit. Currently we render the party name, creator, job icon, and weapon grid. This includes signatures and some fonts.
23 lines
480 B
Text
23 lines
480 B
Text
module PreviewService
|
|
class Canvas
|
|
PREVIEW_WIDTH: Integer
|
|
PREVIEW_HEIGHT: Integer
|
|
DEFAULT_BACKGROUND_COLOR: String
|
|
|
|
def create_blank_canvas: (
|
|
?width: Integer,
|
|
?height: Integer,
|
|
?color: String
|
|
) -> Tempfile
|
|
|
|
def add_text: (
|
|
MiniMagick::Image image,
|
|
String text,
|
|
?x: Integer,
|
|
?y: Integer,
|
|
?size: String,
|
|
?color: String,
|
|
?font: String
|
|
) -> MiniMagick::Image
|
|
end
|
|
end
|