-
Notifications
You must be signed in to change notification settings - Fork 14
/
print.go
47 lines (36 loc) · 786 Bytes
/
print.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
41
42
43
44
45
46
47
//
// Copyright (c) 2020 Jason S. McMullan <jason.mcmullan@gmail.com>
//
package uv3dp
import (
"image"
)
type Print struct {
Properties
}
func (p *Print) Size() Size {
return p.Properties.Size
}
func (p *Print) Exposure() Exposure {
return p.Properties.Exposure
}
func (p *Print) Bottom() Bottom {
return p.Properties.Bottom
}
func (p *Print) Preview(index PreviewType) (ig image.Image, ok bool) {
ig, ok = p.Properties.Preview[index]
return
}
func (p *Print) Metadata(index string) (data interface{}, ok bool) {
data, ok = p.Properties.Metadata[index]
return
}
func (p *Print) LayerImage(index int) (ig *image.Gray) {
return image.NewGray(p.Properties.Bounds())
}
func NewEmptyPrintable(prop Properties) (p *Print) {
p = &Print{
Properties: prop,
}
return
}