Skip to content

Commit

Permalink
Tidy Code
Browse files Browse the repository at this point in the history
  • Loading branch information
J committed Mar 30, 2022
1 parent 12161a8 commit 5b35cc9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions server/meme/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ type Template struct {
}

func (t *Template) Render(text []string) (image.Image, error) {
// b := t.Image.Bounds()
// img := image.NewRGBA(image.Rect(0, 0, b.Dx(), b.Dy()))
dc := gg.NewContextForImage(t.Image)

// draw.Draw(img, img.Bounds(), t.Image, b.Min, draw.Src)

for i, slot := range t.TextSlots {
if i >= len(text) {
break
Expand Down
2 changes: 0 additions & 2 deletions server/meme/text_slot.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ func (s *TextSlot) Render(dc *gg.Context, text string, debug bool) {
break
}

// Some black magic to draw outline
if s.OutlineColor != nil {
offset := face.Metrics().Height / 256 * fixed.Int26_6(outlineWidth)
for _, delta := range []fixed.Point26_6{
Expand All @@ -105,7 +104,6 @@ func (s *TextSlot) Render(dc *gg.Context, text string, debug bool) {
}

dc.SetColor(textColor)
// dc.SetRGB(0.5, 0.5, 0.2)
dc.DrawStringWrapped(text,
xStart,
yStart,
Expand Down

0 comments on commit 5b35cc9

Please sign in to comment.