Fixed non-cannonized rectangles being drawn
This commit is contained in:
parent
77ccde9e9b
commit
8ed1352fd4
@ -77,6 +77,7 @@ type pen struct {
|
||||
}
|
||||
|
||||
func (this *pen) Rectangle (bounds image.Rectangle) {
|
||||
bounds = bounds.Canon()
|
||||
if this.weight == 0 {
|
||||
if this.fill.A > 0 {
|
||||
this.fillRectangle(this.fill, bounds)
|
||||
|
2
go.mod
2
go.mod
@ -3,7 +3,7 @@ module git.tebibyte.media/tomo/x
|
||||
go 1.20
|
||||
|
||||
require (
|
||||
git.tebibyte.media/tomo/tomo v0.26.0
|
||||
git.tebibyte.media/tomo/tomo v0.26.1
|
||||
git.tebibyte.media/tomo/typeset v0.5.2
|
||||
git.tebibyte.media/tomo/xgbkb v1.0.1
|
||||
github.com/jezek/xgb v1.1.0
|
||||
|
4
go.sum
4
go.sum
@ -1,6 +1,6 @@
|
||||
git.tebibyte.media/sashakoshka/xgbkb v1.0.0/go.mod h1:pNcE6TRO93vHd6q42SdwLSTTj25L0Yzggz7yLe0JV6Q=
|
||||
git.tebibyte.media/tomo/tomo v0.26.0 h1:JjOb3ZEsGfpkNBe2nVAfZYw/VrDDPqODH/ANZiG4czU=
|
||||
git.tebibyte.media/tomo/tomo v0.26.0/go.mod h1:C9EzepS9wjkTJjnZaPBh22YvVPyA4hbBAJVU20Rdmps=
|
||||
git.tebibyte.media/tomo/tomo v0.26.1 h1:V5ciRuixMYb79aAawgquFEfJ1icyEmMKBKFPWwi94NE=
|
||||
git.tebibyte.media/tomo/tomo v0.26.1/go.mod h1:C9EzepS9wjkTJjnZaPBh22YvVPyA4hbBAJVU20Rdmps=
|
||||
git.tebibyte.media/tomo/typeset v0.5.2 h1:qHxN62/VDnrAouOuzxLmLleQNwAebshrfVYvtoOnAG4=
|
||||
git.tebibyte.media/tomo/typeset v0.5.2/go.mod h1:PwDpSdBF3l/EzoIsa2ME7QffVVajnTHZN6l3MHEGe1g=
|
||||
git.tebibyte.media/tomo/xgbkb v1.0.1 h1:b3HDUopjdQp1MZrb5Vpil4bOtk3NnNXtfQW27Blw2kE=
|
||||
|
@ -170,7 +170,6 @@ func (this *textBox) drawDot (can canvas.Canvas) {
|
||||
pen := can.Pen()
|
||||
pen.Fill(color.Transparent)
|
||||
pen.Stroke(this.textColor)
|
||||
pen.StrokeWeight(1)
|
||||
|
||||
bounds := this.InnerBounds()
|
||||
metrics := this.face.Metrics()
|
||||
@ -183,6 +182,7 @@ func (this *textBox) drawDot (can canvas.Canvas) {
|
||||
|
||||
switch {
|
||||
case dot.Empty():
|
||||
pen.StrokeWeight(1)
|
||||
pen.Path(roundPt(start.Add(ascent)), roundPt(start.Sub(descent)))
|
||||
|
||||
case start.Y == end.Y:
|
||||
|
Reference in New Issue
Block a user