Skip to content

Commit

Permalink
set the default dpi to 192
Browse files Browse the repository at this point in the history
  • Loading branch information
asmuth committed Jun 9, 2020
1 parent 20fd705 commit f5b10e0
Show file tree
Hide file tree
Showing 26 changed files with 42 additions and 21 deletions.
30 changes: 14 additions & 16 deletions doc/demo.clp
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
(size 2048px 768px)
(dpi 240)
(font "Latin Modern Roman")
(limit-x (0 7200))
(limit-y (0 100))
class: plot;

(axes
label-format-x (datetime "%H:%M:%S")
label-placement-x (linear-interval 900 900 7000))
limit-x: 0 7200;
limit-y: 0 100;

(grid
stroke-color (rgba 0 0 0 0.2)
stroke-style dashed
tick-placement-x (none))
axes {
font: "Latin Modern Roman";
font-size: 12pt;
label-format-x: datetime("%H:%M:%S");
label-placement-x: linear-interval(900 900 7000);
}

(lines
data-x (csv "test/testdata/timeseries.csv" time)
data-y (csv "test/testdata/timeseries.csv" value)
stroke-width 0.8pt)
lines {
data-x: csv(test/testdata/timeseries.csv time);
data-y: csv(test/testdata/timeseries.csv value);
stroke-width: 0.8pt;
}
6 changes: 3 additions & 3 deletions src/layer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ using namespace std::placeholders;
namespace clip {

Layer::Layer() :
width(from_px(1024)),
height(from_px(512)),
dpi(96),
width(from_px(1600)),
height(from_px(800)),
dpi(192),
background_color(Color::fromRGB(1, 1, 1)),
foreground_color(Color::fromRGB(0, 0, 0)),
text_color(Color::fromRGB(0, 0, 0)),
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_default.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_fill_hatch.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_fill_hatch_custom.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_fill_hatch_zero.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_fill_multi.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_fill_solid.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_fill_solid_short.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_short.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_stroke_dash.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_stroke_dash_custom.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_stroke_multi.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_stroke_solid.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_stroke_solid_custom.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/style_stroke_solid_short.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: 100px 100px;

rectangle {
Expand Down
1 change: 1 addition & 0 deletions test/draw/text_basic.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: A6*;

text {
Expand Down
1 change: 1 addition & 0 deletions test/draw/text_color.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: A6*;

text {
Expand Down
1 change: 1 addition & 0 deletions test/draw/text_custom_font.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: A6*;

text {
Expand Down
1 change: 1 addition & 0 deletions test/draw/text_font_size.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: A6*;

text {
Expand Down
1 change: 1 addition & 0 deletions test/draw/text_position.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: A6*;

text {
Expand Down
1 change: 1 addition & 0 deletions test/draw/text_stroke.clp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class: draw;
dpi: 96;
size: A6*;

text {
Expand Down
4 changes: 2 additions & 2 deletions test/general/nomodule.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions test/layer/resize_a4.clp
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
size: A4;
dpi: 96;
1 change: 1 addition & 0 deletions test/layer/resize_a4_landscape.clp
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
size: A4*;
dpi: 96;
1 change: 1 addition & 0 deletions test/layer/resize_mm.clp
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dpi: 96;
size: 200mm 300mm;

0 comments on commit f5b10e0

Please sign in to comment.