Browse Source

small fix

SakiKawasaki 5 years ago
parent
commit
e84bcba967
4 changed files with 7 additions and 6 deletions
  1. 2 1
      badgemaker/badgemaker.nim
  2. BIN
      tests/test7.exe
  3. 1 1
      tests/test7.nim
  4. 4 4
      tests/test7.svg

+ 2 - 1
badgemaker/badgemaker.nim

@@ -122,7 +122,8 @@ proc write*(badge: BadgeRef, filename: string) =
 
   text.add newXMLTree(
     "text", [], {
-      "x": $(image_width + 2), "y": $(badge.height/2 + 5), "fill": badge.label_text_color
+      "x": $(image_width + 2 + parseInt(radius)),
+      "y": $(badge.height/2 + 5), "fill": badge.label_text_color
     }.toXMLAttributes
   )
   text[0].add newText badge.label

BIN
tests/test7.exe


+ 1 - 1
tests/test7.nim

@@ -2,7 +2,7 @@
 import badgemaker
 
 var badge = newBadge(
-  label=" Programming language:", value="Nim",
+  label="Programming language:", value="Nim",
   label_color="#282A36", value_color="fuchsia",
   label_text_color="#e0e0e0", value_text_color="#333",
   width=220, style="plastic"

File diff suppressed because it is too large
+ 4 - 4
tests/test7.svg


Some files were not shown because too many files changed in this diff