Skip to content

Commit 88ee4db

Browse files
authored
Merge pull request #326 from BinaryKits/graphic-symbol
Update Graphic Symbol
2 parents 9d31645 + 5167faa commit 88ee4db

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

src/BinaryKits.Zpl.Label/Elements/ZplGraphicSymbol.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public override IEnumerable<string> Render(ZplRenderOptions context)
5656
//^GSo,h,w
5757
var result = new List<string>();
5858
result.AddRange(RenderPosition(context));
59-
result.Add($"^GS{RenderFieldOrientation(FieldOrientation)},{context.Scale(Height)},{context.Scale(Width)}^FD{(char)Character}^FS");
59+
result.Add($"^GS{RenderFieldOrientation(FieldOrientation)},{context.Scale(Height)},{context.Scale(Width)}^FD{(char?)Character}^FS");
6060

6161
return result;
6262
}

src/BinaryKits.Zpl.Viewer/ElementDrawers/GraphicSymbolElementDrawer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public override SKPoint Draw(ZplElementBase element, DrawerOptions options, SKPo
4545
IsAntialias = options.Antialias
4646
};
4747

48-
string displayText = $"{(char)graphicSymbol.Character}";
48+
string displayText = $"{(char?)graphicSymbol.Character}";
4949
float totalWidth = skFont.MeasureText(displayText, out SKRect textBounds);
5050

5151
using (new SKAutoCanvasRestore(this.skCanvas))
32 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)