- stx_goodies_libcairo
changed:
#classNamesAndAttributes
#extensionMethodNames
#preRequisites
- Cairo::Surface
added: #finish
- Cairo::ClockView
added:
#initialize
#new
#redraw
#version_SVN
- Cairo::GraphicsContext
added: #showPage
- extensions
...
"{ Package: 'stx:goodies/libcairo' }"
"{ NameSpace: Cairo }"
SimpleView subclass:#ClockView
instanceVariableNames:'cr'
classVariableNames:''
poolDictionaries:''
category:'Cairo-Examples'
!
!ClockView class methodsFor:'instance creation'!
new
"return an initialized instance"
^ self basicNew initialize.
! !
!ClockView methodsFor:'redrawing'!
redraw
cr isNil ifTrue:[cr := self cairo].
cr paint: Color black.
cr moveToX: 30 y: 50.
cr fontFaceFamily: 'Times' slant: (Cairo::FontSlant FONT_SLANT_ITALIC) weight: 2.
cr fontSize: 30.
cr showText: 'Cairo in Smalltalk/X'.
cr paint: (Color red alpha: 0.5).
cr rectangleX: 10 y: 15 width: 150 height: 60.
cr fill.
cr paint: (Color red alpha: 0.75).
cr rectangleX: 10 y: 15 width: 150 height: 60.
cr stroke.
"Created: / 16-06-2012 / 23:25:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ClockView class methodsFor:'documentation'!
version_SVN
^ '$Id:: $'
! !