aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2019-12-08 02:29:49 +0100
committerDaniel Schadt <kingdread@gmx.de>2019-12-08 02:29:49 +0100
commitd85df53b64030569ad3549ab463b96d54f919cfa (patch)
tree86bb30b83d353a71ff894f96df61dcccb220c6a4 /src
parent1547e0f3e48438a6019f0e5f60199b9a8c864a85 (diff)
downloadkondou-d85df53b64030569ad3549ab463b96d54f919cfa.tar.gz
kondou-d85df53b64030569ad3549ab463b96d54f919cfa.tar.bz2
kondou-d85df53b64030569ad3549ab463b96d54f919cfa.zip
fix background cropping
Diffstat (limited to 'src')
-rw-r--r--src/render.rs16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/render.rs b/src/render.rs
index 927782c..437b66c 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -40,10 +40,10 @@ impl Default for RenderOptions {
fn default() -> Self {
RenderOptions {
skill_size: 100,
- traitline_height: 160,
- traitline_width: 550,
+ traitline_height: 137,
+ traitline_width: 647,
traitline_brightness: 100,
- traitline_x_offset: 0,
+ traitline_x_offset: 200,
trait_size: 30,
line_color: Rgba([0, 0, 0, 255]),
line_height: 4,
@@ -58,8 +58,14 @@ impl Default for RenderOptions {
}
}
-const BG_CROP_HEIGHT: u32 = 160;
-const BG_CROP_WIDTH: u32 = 550;
+// These values were determined from the thief specialization background images, as those do not
+// have anything fancy going on and are instead transparent. Therefore, we can use them as a
+// "reference" for the intended specialization crop size.
+//
+// Note: Increasing those values will mean that thief build templates will end up with more
+// transparency than intended.
+const BG_CROP_HEIGHT: u32 = 136;
+const BG_CROP_WIDTH: u32 = 647;
pub struct Renderer<'r> {
api: &'r mut Api,