-
Notifications
You must be signed in to change notification settings - Fork 0
/
twine_helpers.go
40 lines (37 loc) · 1.32 KB
/
twine_helpers.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package ptxt
// NOTICE: TWINES ARE UNIMPLEMENTED
//
// Related to [RendererTwine.RegisterFunc]().
type TwineEffectArgs struct {
Renderer *Renderer
Payload []byte
OX, OY int
StartIndex int
EndIndex int
MinWidth int
StartWrap bool // whether the effect is re-starting after a line break
EndWrap bool // whether the effect splits at a line break
// DrawPass (not really, I still have to figure out the model,
// sometimes we only apply the func at measure time?
// Maybe I can tell based on the func type if it's
// only measuring, only drawing, or both)
}
// NOTICE: TWINES ARE UNIMPLEMENTED
//
// ...
func (self *TwineEffectArgs) AssertPayloadLen(numBytes int) {
panic("unimplemented")
}
// NOTICE: TWINES ARE UNIMPLEMENTED
//
// Related to [Twine.PushPadder](). Most of the time, you
// create padders directly with TwinePadder{ PrePad: 16 } or
// similar, defining only the required fields.
type TwinePadder struct {
PrePad uint16 // padding before the block
PostPad uint16 // padding after the block
MinWidth uint16 // can't be disconnected from PrePad or LineStartPad
LineStartPad uint16 // padding after block break (should be <= PrePad)
LineBreakPad uint16 // padding on block break (should be <= PostPad)
UnitsScaled bool // if true, units are considered to be already scaled
}