@@ -13,6 +13,7 @@ Type GraphicsOutput
13
13
Field m_SourceImageSize:SVec2I = Null
14
14
15
15
Field m_InputZoom:Int = g_DefaultInputZoom
16
+ Field m_OutputZoom:Int = g_DefaultOutputZoom
16
17
Field m_TileSize:Int = 24 * m_InputZoom
17
18
Field m_FrameCount:Int = g_DefaultFrameCount
18
19
Field m_BackgroundColor:Int [] = [g_DefaultBackgroundRed, g_DefaultBackgroundGreen, g_DefaultBackgroundBlue]
@@ -72,6 +73,13 @@ Type GraphicsOutput
72
73
Return m_InputZoom
73
74
EndMethod
74
75
76
+ '////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
77
+
78
+ Method SetOutputZoom :Int (newZoom:Int )
79
+ m_OutputZoom = Utility.Clamp(newZoom, 1 , 5 )
80
+ Return m_OutputZoom
81
+ EndMethod
82
+
75
83
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
76
84
77
85
Method SetBackgroundColor :Int [] (rgbValue:Int [] )
@@ -197,14 +205,6 @@ Type GraphicsOutput
197
205
Local vertOffsetFromSource:Int = (m_SourceImageSize[ 1 ] * m_InputZoom) + 34
198
206
m_LimbManager.DrawBentLimbs(New SVec2I (100 , vertOffsetFromSource), m_FrameCount, m_BentLimbPartDrawOrder)
199
207
200
- SetColor(m_Magenta[ 0 ] , m_Magenta[ 1 ] , m_Magenta[ 2 ] )
201
- DrawRect(0 , 0 , GraphicsWidth(), (m_SourceImageSize[ 1 ] * m_InputZoom) + 1 ) 'Extend the source image magenta strip all the way to the right and adjust height to input zoom
202
- Utility.ResetDrawColor()
203
- DrawImageRect(m_SourceImage, 0 , 0 , m_SourceImageSize[ 0 ] * m_InputZoom, m_SourceImageSize[ 1 ] * m_InputZoom)
204
-
205
- m_LimbManager.DrawTileOutlines()
206
- m_LimbManager.DrawJointMarkers()
207
-
208
208
Local drawColor:Int [] = [ 255 , 230 , 80 ]
209
209
Utility.DrawTextWithShadow(" Arm FG" , New SVec2I (10 , vertOffsetFromSource), drawColor)
210
210
Utility.DrawTextWithShadow(" Arm BG" , New SVec2I (10 , vertOffsetFromSource + 50 - 2 ), drawColor)
@@ -222,6 +222,21 @@ Type GraphicsOutput
222
222
Next
223
223
Next
224
224
EndIf
225
+
226
+ If m_OutputZoom > 1 Then
227
+ Local outputCopyForZoom:TImage = CreateImage(100 + (m_FrameCount * ((m_TileSize / m_InputZoom) + 8 )), 230 , 1 , DYNAMICIMAGE)
228
+ GrabImage(outputCopyForZoom, 0 , m_SourceImageSize[ 1 ] * m_InputZoom)
229
+ DrawImageRect(outputCopyForZoom, 0 , m_SourceImageSize[ 1 ] * m_InputZoom, outputCopyForZoom.Width * m_OutputZoom, outputCopyForZoom.Height * m_OutputZoom)
230
+ EndIf
231
+
232
+ SetColor(m_Magenta[ 0 ] , m_Magenta[ 1 ] , m_Magenta[ 2 ] )
233
+ DrawRect(0 , 0 , GraphicsWidth(), (m_SourceImageSize[ 1 ] * m_InputZoom) + 1 ) 'Extend the source image magenta strip all the way to the right and adjust height to input zoom
234
+ Utility.ResetDrawColor()
235
+ DrawImageRect(m_SourceImage, 0 , 0 , m_SourceImageSize[ 0 ] * m_InputZoom, m_SourceImageSize[ 1 ] * m_InputZoom)
236
+
237
+ m_LimbManager.DrawTileOutlines()
238
+ m_LimbManager.DrawJointMarkers()
239
+
225
240
Flip(1 )
226
241
EndIf
227
242
EndMethod
0 commit comments