@@ -63,6 +63,12 @@ Type GraphicsOutput
63
63
Return m_InputZoom
64
64
EndMethod
65
65
66
+ '////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
67
+
68
+ Method GetFrameCount :Int ()
69
+ Return m_FrameCount
70
+ EndMethod
71
+
66
72
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
67
73
68
74
Method SetFrameCount :Int (newCount:Int )
@@ -76,6 +82,14 @@ Type GraphicsOutput
76
82
SetClsColor(rgbValue[ 0 ] , rgbValue[ 1 ] , rgbValue[ 2 ] )
77
83
EndMethod
78
84
85
+ '////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
86
+
87
+ Method RevertBackgroundColorAfterSave (revertOrNot:Int )
88
+ If revertOrNot Then
89
+ ChangeBackgroundColor(m_BackgroundColor)
90
+ EndIf
91
+ EndMethod
92
+
79
93
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
80
94
81
95
Method SetDrawOutputFrameBounds (drawOrNot:Int )
@@ -92,7 +106,6 @@ Type GraphicsOutput
92
106
m_LimbManager.SetJointMarker(mousePos)
93
107
EndIf
94
108
EndIf
95
- ChangeBackgroundColor(m_BackgroundColor)
96
109
EndMethod
97
110
98
111
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -136,36 +149,40 @@ Type GraphicsOutput
136
149
137
150
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
138
151
139
- Method GrabOutputForSaving ()
140
- Rem
141
-
152
+ Method GrabOutputForSaving :TPixmap ()
142
153
If m_SourceImage = Null Then
143
154
Notify(" Nothing to save!" , False )
144
155
Else
145
156
ChangeBackgroundColor(c_Magenta)
146
157
Draw()
158
+ Flip(1 ) 'Have to flip again for background color to actually change, not sure why but whatever
159
+ Return GrabPixmap(55 , 120 , 34 * m_FrameCount, 210 )
160
+ EndIf
161
+ EndMethod
147
162
148
- If Not g_FileIO.m_SaveAsFrames Then
149
- g_FileIO.SaveFile(GrabPixmap(55, 120, 34 * m_FrameCount, 210))
150
- Else
151
- Local framesToSave:TPixmap[c_LimbCount, m_FrameCount]
152
- For Local row:Int = 0 To 3
153
- For Local frame:Int = 0 To m_FrameCount - 1
154
- 'Grab pixmap inside tile bounds for saving
155
- framesToSave[row, frame] = GrabPixmap(63 + (frame * (m_TileSize / m_InputZoom + 8)), 139 + (row * 48), m_TileSize / m_InputZoom, m_TileSize / m_InputZoom)
156
- 'HFlip the legs so they're facing right
157
- If row >= 2 Then
158
- framesToSave[row, frame] = XFlipPixmap(framesToSave[row, frame])
159
- EndIf
160
- Next
161
- Next
162
- g_FileIO.SaveFileAsFrames(framesToSave, m_FrameCount)
163
- EndIf
163
+ '////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
164
164
165
- ChangeBackgroundColor(m_BackgroundColor)
165
+ Method GrabOutputFramesForSaving :TPixmap [ ,] ()
166
+ If m_SourceImage = Null Then
167
+ Notify(" Nothing to save!" , False )
168
+ Else
169
+ ChangeBackgroundColor(c_Magenta)
170
+ Draw()
171
+ Flip(1 ) 'Have to flip again for background color to actually change, not sure why but whatever
172
+
173
+ Local framesToSave:TPixmap [ c_LimbCount, m_FrameCount]
174
+ For Local row:Int = 0 To 3
175
+ For Local frame:Int = 0 Until m_FrameCount
176
+ 'Grab pixmap inside tile bounds for saving
177
+ framesToSave[ row, frame] = GrabPixmap(63 + (frame * (m_TileSize / m_InputZoom + 8 )), 139 + (row * 48 ), m_TileSize / m_InputZoom, m_TileSize / m_InputZoom)
178
+ 'HFlip the legs so they're facing right
179
+ If row >= 2 Then
180
+ framesToSave[ row, frame] = XFlipPixmap(framesToSave[ row, frame] )
181
+ EndIf
182
+ Next
183
+ Next
184
+ Return framesToSave
166
185
EndIf
167
-
168
- EndRem
169
186
EndMethod
170
187
171
188
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
0 commit comments