Cairo__TextCluster.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 05 Apr 2016 10:00:57 +0100
changeset 77 cdf856e78998
parent 63 054f0513ea65
child 88 9d51db2ba641
permissions -rw-r--r--
CairoGraphicsContext: Fixed paint setting Even though methods like #foreground: / #foreground:background: method are marked obsolete for quite some time, a lot of core widgets are still using them (!). Therefore CairoGraphicsContext must implement them to correctly update Cairo context. This fixes issues with EditField.

"{ Package: 'stx:goodies/libcairo' }"

"{ NameSpace: Cairo }"

ExternalAddress subclass:#TextCluster
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Cairo-Constants'
!


!TextCluster class methodsFor:'accessing'!

libraryName

    OperatingSystem isUNIXlike ifTrue:[^'libcairo.so.2'].

    OperatingSystem isMSWINDOWSlike ifTrue:[^'cairo.dll'].

    self error:'Library name for host OS is not known'
!

sizeof
    "Returns size of undelaying structure in bytes"

    ^8
! !

!TextCluster methodsFor:'accessing'!

numBytes
    "Returns int32"

    ^self longAt:1 + 0
!

numBytes: value

    self longAt:1 + 0 put:value
!

numGlyphs
    "Returns int32"

    ^self longAt:1 + 4
!

numGlyphs: value

    self longAt:1 + 4 put:value
! !

!TextCluster class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !