Move welcome logo to lower right
This commit is contained in:
@@ -123,20 +123,30 @@ Describe 'Welcome wallpaper with AD metadata' {
|
||||
$result.LocationText | Should Be "Acceso al Aula Flexible`ndel Centro de Experiencia Digital."
|
||||
}
|
||||
|
||||
It 'ships the logo inside the base image instead of compositing it at runtime' {
|
||||
It 'ships the logo at the lower right of the base image instead of compositing it at runtime' {
|
||||
$source | Should Not Match 'lasalle-logo-blanco|DrawImage.*logo|composite.*logo'
|
||||
$bitmap = [Drawing.Bitmap]::FromFile((Join-Path $repositoryRoot 'assets\branding\darkblue.jpg'))
|
||||
try {
|
||||
$whitePixels = 0
|
||||
$upperLeftWhitePixels = 0
|
||||
for ($x = 60; $x -lt 390; $x += 2) {
|
||||
for ($y = 45; $y -lt 175; $y += 2) {
|
||||
$pixel = $bitmap.GetPixel($x, $y)
|
||||
if ($pixel.R -gt 220 -and $pixel.G -gt 220 -and $pixel.B -gt 220) {
|
||||
$whitePixels++
|
||||
$upperLeftWhitePixels++
|
||||
}
|
||||
}
|
||||
}
|
||||
($whitePixels -gt 250) | Should Be $true
|
||||
$lowerRightWhitePixels = 0
|
||||
for ($x = 1225; $x -lt 1525; $x += 2) {
|
||||
for ($y = 805; $y -lt 930; $y += 2) {
|
||||
$pixel = $bitmap.GetPixel($x, $y)
|
||||
if ($pixel.R -gt 220 -and $pixel.G -gt 220 -and $pixel.B -gt 220) {
|
||||
$lowerRightWhitePixels++
|
||||
}
|
||||
}
|
||||
}
|
||||
($upperLeftWhitePixels -lt 25) | Should Be $true
|
||||
($lowerRightWhitePixels -gt 250) | Should Be $true
|
||||
}
|
||||
finally {
|
||||
$bitmap.Dispose()
|
||||
|
||||
Reference in New Issue
Block a user