XGraphicsContext.st
branchjv
changeset 7541 39940e2446a5
parent 6727 f3449322bf47
child 7718 6e51fc8b207f
--- a/XGraphicsContext.st	Thu Sep 01 23:27:10 2016 +0100
+++ b/XGraphicsContext.st	Mon Aug 01 23:30:02 2016 +0100
@@ -1,7 +1,7 @@
 "{ Package: 'stx:libview' }"
 
 DeviceGraphicsContext subclass:#XGraphicsContext
-	instanceVariableNames:'xftDrawId cairoSurfaceId'
+	instanceVariableNames:'depth xftDrawId cairoSurfaceId'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Interface-Graphics'
@@ -10,6 +10,10 @@
 
 !XGraphicsContext methodsFor:'accessing'!
 
+depth
+    ^ depth
+!
+
 xftDrawId
     ^ xftDrawId
 !
@@ -35,6 +39,19 @@
     "Modified: / 26-12-2014 / 22:51:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!XGraphicsContext methodsFor:'view creation'!
+
+createBitmapFromArray:data width:width height:height
+    depth := 1.
+    super createBitmapFromArray:data width:width height:height
+!
+
+createPixmapWidth:w height:h depth:d
+    depth := d.
+    super createPixmapWidth:w height:h depth:d
+! !
+
+
 !XGraphicsContext class methodsFor:'documentation'!
 
 version_HG