Cairo context and surface management for CairoGraphicsContext reworked to work under Win32
Win32 surfaces take initial clip/bounds from the passed device context. Therefore
when the view changes its size, the drawing is still clipped by the initial
size. Xlib surfaces need to be updated when window size changes.
This means that under Win32 the surface must be thrown away whenever the size
of the view changes. To do so, CairoGraphicsContext registers on #sizeOfView event
and updates (Xlib surfaces) or recreate surface and cairo context (Win32 surfaces).
Under Win32, use new WinWworkstation>>#dcLockForGC:/#dcUnlockForGC: to make sure
the device context is not released behind the back for Cairo's surface.
This reworked code depends on new API in stx:libview (see commits in stx:libview
9f5e7ff7c729 and 1b427e95d77c)
This should fix issue #2.
"{ Package: 'stx:goodies/libcairo' }"
"{ NameSpace: Cairo }"
Error subclass:#CError
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'Cairo-Exceptions'
!
!CError methodsFor:'printing & storing'!
description
"return the description string of the signal"
parameter isInteger ifTrue:[
messageText isNil ifTrue:[
^ CPrimitives cairo_status_to_string: parameter.
].
^ messageText , ': ' , (CPrimitives cairo_status_to_string: parameter).
].
^ super description
"
(CError new parameter: 1) description
(CError new messageText: 'Failed to create Cairo'; parameter: 1) description
(CError new messageText: 'Failed to create Cairo') description
"
"Created: / 23-02-2016 / 16:52:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CError class methodsFor:'documentation'!
version_HG
^ '$Changeset: <not expanded> $'
! !