DeviceGraphicsContext.st
changeset 6926 d04d6d93b921
parent 6765 dd2a04d4f86e
child 6933 8c853e66a469
child 7060 e7ecabecd7e2
equal deleted inserted replaced
6924:295e6d594ca0 6926:d04d6d93b921
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1992 by Claus Gittinger
     4  COPYRIGHT (c) 1992 by Claus Gittinger
     3 	      All Rights Reserved
     5 	      All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
   100 "
   102 "
   101     |device|
   103     |device|
   102 
   104 
   103     device := Screen current.
   105     device := Screen current.
   104     device isNil ifTrue:[
   106     device isNil ifTrue:[
   105 	device := Display.
   107         device := Display.
   106 	device isNil ifTrue:[
   108         device isNil ifTrue:[
   107 	    (self class name,' [warning]: no Display') infoPrintCR.
   109             (self class name,' [warning]: no Display') infoPrintCR.
   108 	    Smalltalk openDisplay.
   110             Smalltalk openDisplay.
   109 	].
   111             
   110     ].
   112             device := Screen current.
   111     ^ self onDevice:Screen current "Display"
   113             device isNil ifTrue:[ self error:'no screen device' ]
       
   114         ].
       
   115     ].
       
   116     ^ self onDevice:device
   112 !
   117 !
   113 
   118 
   114 on:aDevice
   119 on:aDevice
   115     "create a new drawable on aDevice"
   120     "create a new drawable on aDevice"
   116 
   121 
  4221 ! !
  4226 ! !
  4222 
  4227 
  4223 !DeviceGraphicsContext class methodsFor:'documentation'!
  4228 !DeviceGraphicsContext class methodsFor:'documentation'!
  4224 
  4229 
  4225 version
  4230 version
  4226     ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.150 2015-02-10 18:09:32 stefan Exp $'
  4231     ^ '$Header$'
  4227 !
  4232 !
  4228 
  4233 
  4229 version_CVS
  4234 version_CVS
  4230     ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.150 2015-02-10 18:09:32 stefan Exp $'
  4235     ^ '$Header$'
  4231 ! !
  4236 ! !
  4232 
  4237 
  4233 
  4238 
  4234 DeviceGraphicsContext initialize!
  4239 DeviceGraphicsContext initialize!