diff --git a/src/Alexandrie-Cairo-Tests/AeCairoExamplesRenderTest.class.st b/src/Alexandrie-Cairo-Tests/AeCairoExamplesRenderTest.class.st index 0531749..7273239 100644 --- a/src/Alexandrie-Cairo-Tests/AeCairoExamplesRenderTest.class.st +++ b/src/Alexandrie-Cairo-Tests/AeCairoExamplesRenderTest.class.st @@ -93,7 +93,7 @@ AeCairoExamplesRenderTest >> surfaceWithAllOperators [ AeCairoExamplesRenderTest >> surfaceWithColoredIcons [ | inputForm inputSurface outputColors outputSurface outputContext | - inputForm := self iconNamed: #windowClose. + inputForm := Form fromFileNamed: AeFilesystemResources removeIconPNG. inputSurface := AeCairoImageSurface fromForm: inputForm. outputColors := Color wheel: 7. @@ -352,7 +352,7 @@ AeCairoExamplesRenderTest >> surfaceWithGouraudBasedTriangle [ AeCairoExamplesRenderTest >> surfaceWithPixelatedIcon [ | iconForm iconSurface iconPattern scale aSurface aContext | - iconForm := Smalltalk ui icons iconNamed: #removeIcon. + iconForm := Form fromFileNamed: AeFilesystemResources removeIconPNG. iconSurface := AeCairoImageSurface fromForm: iconForm. iconPattern := AeCairoSurfacePattern surface: iconSurface. scale := 5.0. @@ -604,10 +604,9 @@ AeCairoExamplesRenderTest >> surfaceWithStraightEdgesCurve [ AeCairoExamplesRenderTest >> surfaceWithStretchedIcon [ | aSurface aContext iconForm iconSurface iconPattern horizontalScale verticalScale | - iconForm := Smalltalk ui icons iconNamed: #classIcon. - self assert: iconForm extent = (16@16). + iconForm := Form fromFileNamed: AeFilesystemResources removeIconPNG. horizontalScale := 0.5. - verticalScale := 4.0. + verticalScale := 2.0. iconSurface := AeCairoImageSurface fromForm: iconForm. iconPattern := AeCairoSurfacePattern surface: iconSurface. diff --git a/src/Alexandrie-Cairo-Tests/AeCairoImageSurfaceTest.class.st b/src/Alexandrie-Cairo-Tests/AeCairoImageSurfaceTest.class.st index f717eda..2c77297 100644 --- a/src/Alexandrie-Cairo-Tests/AeCairoImageSurfaceTest.class.st +++ b/src/Alexandrie-Cairo-Tests/AeCairoImageSurfaceTest.class.st @@ -41,7 +41,7 @@ AeCairoImageSurfaceTest >> testExtentFormat [ AeCairoImageSurfaceTest >> testFromForm [ | aForm | - aForm := Smalltalk ui icons iconNamed: #classIcon. + aForm := Form fromFileNamed: AeFilesystemResources removeIconPNG. surface := AeCairoImageSurface fromForm: aForm. self assert: surface extent equals: aForm extent diff --git a/src/Alexandrie-Cairo-Tests/AeFilesystemResources.extension.st b/src/Alexandrie-Cairo-Tests/AeFilesystemResources.extension.st index 248fde9..b3ff5de 100644 --- a/src/Alexandrie-Cairo-Tests/AeFilesystemResources.extension.st +++ b/src/Alexandrie-Cairo-Tests/AeFilesystemResources.extension.st @@ -5,3 +5,15 @@ AeFilesystemResources class >> cairoDirectory [ ^ self testsDirectory / 'cairo' ] + +{ #category : #'*Alexandrie-Cairo-Tests' } +AeFilesystemResources class >> imagesDirectory [ + + ^ self testsDirectory / 'images' +] + +{ #category : #'*Alexandrie-Cairo-Tests' } +AeFilesystemResources class >> removeIconPNG [ + + ^ self imagesDirectory / 'removeIcon.png' +]