@@ -4,6 +4,8 @@ Import "LimbManager.bmx"
4
4
'//// GRAPHICS OUTPUT ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
5
5
6
6
Type GraphicsOutput
7
+ Field m_CanvasVisibleArea:SVec2I = Null
8
+
7
9
Field m_SourceImage:TImage = Null
8
10
Field m_SourceImageSize:SVec2I = Null
9
11
@@ -30,10 +32,11 @@ Type GraphicsOutput
30
32
31
33
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
32
34
33
- Method New (maxWorkspaceWidth:Int )
35
+ Method New (maxWorkspaceWidth:Int , canvasVisibleArea: SVec2I )
34
36
SetClsColor(m_BackgroundColor[ 0 ] , m_BackgroundColor[ 1 ] , m_BackgroundColor[ 2 ] )
35
37
SetMaskColor(m_Magenta[ 0 ] , m_Magenta[ 1 ] , m_Magenta[ 2 ] )
36
38
39
+ m_CanvasVisibleArea = canvasVisibleArea
37
40
m_MaxInputZoom = Int (FloorF(maxWorkspaceWidth / 192 ))
38
41
39
42
m_LimbManager = New LimbManager ()
@@ -58,6 +61,12 @@ Type GraphicsOutput
58
61
Return False
59
62
EndMethod
60
63
64
+ '////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
65
+
66
+ Method SetCanvasVisibleArea (visibleArea:SVec2I )
67
+ m_CanvasVisibleArea = visibleArea
68
+ EndMethod
69
+
61
70
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
62
71
63
72
Method SetBackgroundColor :Int [] (rgbValue:Int [] )
@@ -249,7 +258,7 @@ Type GraphicsOutput
249
258
SetScale(2 , 2 )
250
259
Local textToDraw:String = " NO IMAGE LOADED!"
251
260
Local drawColor:Int [] = [ 255 , 230 , 80 ]
252
- Utility.DrawTextWithShadow(textToDraw, New SVec2I ((GraphicsWidth() / 2 ) - TextWidth(textToDraw), (GraphicsHeight() / 2 ) - TextHeight(textToDraw)), drawColor)
261
+ Utility.DrawTextWithShadow(textToDraw, New SVec2I ((m_CanvasVisibleArea [ 0 ] / 2 ) - TextWidth(textToDraw), (m_CanvasVisibleArea [ 1 ] / 2 ) - TextHeight(textToDraw)), drawColor)
253
262
SetScale(1 , 1 )
254
263
Flip(1 )
255
264
EndMethod
0 commit comments