-
Notifications
You must be signed in to change notification settings - Fork 0
/
image.go
99 lines (82 loc) · 2.01 KB
/
image.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package input
import (
"github.com/dynamicpdf-api/go-client/v2/resource"
"github.com/google/uuid"
)
// Represents an image input.
type Image struct {
Input
}
/*
Initializes a new instance of the `ImageInput` class.
- @param {string} resource object to create ImageInput. | The image file path present in cloud resource manager.
*/
func NewImageWithResourcePath(value string) *Image {
var p Image
p.ResourceName = value
p.inputType = p.InputType()
return &p
}
/*
Initializes a new instance of the `ImageInput` class.
- @param {ImageResource} resource object to create ImageInput. | The image file path present in cloud resource manager.
*/
func NewImagewithImageResource(value resource.ImageResource) *Image {
var p Image
p.resources = append(p.resources, value.Resource)
p.SetId(uuid.NewString())
p.inputType = p.InputType()
p.ResourceName = value.ResourceName
return &p
}
func (p *Image) InputType() InputType {
return ImageInput
}
// Gets the pageWidth.
func (p *Image) PageWidth() float32 {
return p.pageWidth
}
// sets the pageWidth.
func (p *Image) SetPageWidth(value float32) {
p.pageWidth = value
}
// Gets the PageHeight.
func (p *Image) PageHeight() float32 {
return p.pageHeight
}
// sets the PageHeight.
func (p *Image) SetPageHeight(value float32) {
p.pageHeight = value
}
// Gets the TopMargin.
func (p *Image) TopMargin() float32 {
return p.topMargin
}
// sets the TopMargin.
func (p *Image) SetTopMargin(value float32) {
p.topMargin = value
}
// Gets the BottomMargin.
func (p *Image) BottomMargin() float32 {
return p.bottomMargin
}
// sets the BottomMargin.
func (p *Image) SetBottomMargin(value float32) {
p.bottomMargin = value
}
// Gets the LeftMargin.
func (p *Image) LeftMargin() float32 {
return p.leftMargin
}
// sets the LeftMargin.
func (p *Image) SetLeftMargin(value float32) {
p.leftMargin = value
}
// Gets the RightMargin.
func (p *Image) RightMargin() float32 {
return p.rightMargin
}
// sets the RightMargin.
func (p *Image) SetRightMargin(value float32) {
p.rightMargin = value
}