github.com/jmigpin/editor@v1.6.0/util/drawutil/drawer4/pointof.go (about) 1 package drawer4 2 3 type PointOf struct { 4 d *Drawer 5 } 6 7 func (po *PointOf) Init() {} 8 9 func (po *PointOf) Iter() { 10 if po.d.iters.runeR.isNormal() { 11 if po.d.st.runeR.ri >= po.d.st.pointOf.index { 12 po.d.iterStop() 13 return 14 } 15 } 16 if !po.d.iterNext() { 17 return 18 } 19 } 20 21 func (po *PointOf) End() { 22 // pen is top/left, use what penbounds is using 23 penb := po.d.iters.runeR.penBounds() 24 po.d.st.pointOf.p = penb.Min.ToPointFloor() 25 }