Cairo__Rectangle.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 23 Apr 2009 15:35:17 +0000
changeset 10 dd5fece7c8d2
parent 7 392289f92fab
child 11 fdc697f4f190
permissions -rw-r--r--
Few hacks before presentation at Smalltalk Jihlava 2009
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/libcairo' }"
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
"{ NameSpace: Cairo }"
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
ExternalStructure subclass:#Rectangle
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
	instanceVariableNames:''
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
	classVariableNames:''
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
	poolDictionaries:''
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
     9
	category:'Cairo - Objects'
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
!
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
7
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    12
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
!Rectangle class methodsFor:'accessing'!
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
libraryName
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
7
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    17
	OperatingSystem isUNIXlike ifTrue:[^'libcairo.so.2'].
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
	OperatingSystem isMSWINDOWSlike ifTrue:[^'cairo.dll'].
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
	self error:'Library name for host OS is not known'
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
7
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    23
    "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    24
!
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    25
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    26
structSize
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    27
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    28
	^256
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    29
7
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    30
    "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
! !
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    33
!Rectangle methodsFor:'accessing'!
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    35
height
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    37
	^self doubleAt:1 + 24
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
7
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    39
    "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
!
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    42
height: value
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
	self doubleAt:1 + 24 put:value
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
7
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    46
    "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
!
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    49
width
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    51
	^self doubleAt:1 + 16
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
7
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    53
    "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
!
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    56
width: value
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
	self doubleAt:1 + 16 put:value
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
7
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    60
    "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
!
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    63
x
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    65
	^self doubleAt:1 + 0
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
7
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    67
    "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
!
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    70
x: value
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
	self doubleAt:1 + 0 put:value
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
7
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    74
    "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
!
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    77
y
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    79
	^self doubleAt:1 + 8
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
7
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    81
    "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
!
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    83
6
c1f387b40e3a regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5
diff changeset
    84
y: value
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    86
	self doubleAt:1 + 8 put:value
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    87
7
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    88
    "Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
1
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    89
! !
2439fb18f3dc Initial commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    90
7
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    91
!Rectangle class methodsFor:'documentation'!
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    92
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    93
version
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    94
    ^'$Id$'
392289f92fab - DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 6
diff changeset
    95
! !