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' +] diff --git a/src/Alexandrie-Canvas-Tests/AeCanvasTest.class.st b/src/Alexandrie-Canvas-Tests/AeCanvasTest.class.st index ac085bb..d5e5bbe 100644 --- a/src/Alexandrie-Canvas-Tests/AeCanvasTest.class.st +++ b/src/Alexandrie-Canvas-Tests/AeCanvasTest.class.st @@ -328,10 +328,10 @@ AeCanvasTest >> renderEmoji [ AeCanvasTest >> renderForm [ | aeCanvas aForm | - aeCanvas := AeCanvas extent: 50@75. + aeCanvas := AeCanvas extent: 60@20. aeCanvas clear: Color paleGreen. - aForm := Smalltalk ui icons iconNamed: #pharoBig. + aForm := Form fromFileNamed: AeFilesystemResources removeIconPNG. aeCanvas pathScale: (aeCanvas extent / aForm extent) asFloatPoint. aeCanvas pathFactory: [ :cairoContext | diff --git a/tests/cairo/surfaceWithColoredIcons.png b/tests/cairo/surfaceWithColoredIcons.png index 2254a16..881b42f 100644 Binary files a/tests/cairo/surfaceWithColoredIcons.png and b/tests/cairo/surfaceWithColoredIcons.png differ diff --git a/tests/cairo/surfaceWithStretchedIcon.png b/tests/cairo/surfaceWithStretchedIcon.png index bc23338..7a95984 100644 Binary files a/tests/cairo/surfaceWithStretchedIcon.png and b/tests/cairo/surfaceWithStretchedIcon.png differ diff --git a/tests/canvas/renderForm.png b/tests/canvas/renderForm.png index 2e21367..eecc374 100644 Binary files a/tests/canvas/renderForm.png and b/tests/canvas/renderForm.png differ diff --git a/tests/images/removeIcon.png b/tests/images/removeIcon.png new file mode 100644 index 0000000..181b0f1 Binary files /dev/null and b/tests/images/removeIcon.png differ