SolidBackground.st
author Stefan Vogel <sv@exept.de>
Tue, 28 Apr 2020 15:28:14 +0200
changeset 9038 dd177fea6408
parent 7943 f6486c8f64dc
permissions -rw-r--r--
#REFACTORING by stefan class: Font changed: #setFamily:face:style:size:sizeUnit:encoding:device:

"
 COPYRIGHT (c) 2009 by Claus Gittinger / eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libview' }"

"{ NameSpace: Smalltalk }"

AbstractBackground subclass:#SolidBackground
	instanceVariableNames:'color'
	classVariableNames:''
	poolDictionaries:''
	category:'Graphics-Support'
!

!SolidBackground class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2009 by Claus Gittinger / eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

examples
"
    |v|

    v := View new.
    v viewBackground:(SolidBackground new color:Color red).
    v open.
"
! !

!SolidBackground methodsFor:'accessing'!

color
    ^ color
!

color:something
    color := something.
! !

!SolidBackground methodsFor:'drawing'!

fillRectangleX:x y:y width:w height:h in:aView
    aView paint:color.
    aView fillRectangleX:x y:y width:w height:h

    "Created: / 23-01-2011 / 01:59:29 / cg"
! !

!SolidBackground class methodsFor:'documentation'!

version_CVS
    ^ '$Header$'
! !