Lines 1255-1298
BitmapEx VCL_DLLPUBLIC createBlendFrame(
Link Here
|
1255 |
pContent->SetPixel(y, x, aColorTopLeft); |
1255 |
pContent->SetPixel(y, x, aColorTopLeft); |
1256 |
pAlpha->SetPixelIndex(y, x, nAlpha); |
1256 |
pAlpha->SetPixelIndex(y, x, nAlpha); |
1257 |
|
1257 |
|
1258 |
for(x = 1; x < nW - 1; x++) // y == 0 |
1258 |
if ( nW > 1 ) |
1259 |
{ |
1259 |
{ |
1260 |
Color aMix(aColorTopLeft); |
1260 |
for ( x = 1; x < nW - 1; x++ ) // y == 0 |
|
|
1261 |
{ |
1262 |
Color aMix( aColorTopLeft ); |
1261 |
|
1263 |
|
1262 |
aMix.Merge(aColorTopRight, 255 - sal_uInt8((x * 255) / nW)); |
1264 |
aMix.Merge( aColorTopRight, 255 - sal_uInt8( ( x * 255 ) / nW ) ); |
1263 |
pContent->SetPixel(y, x, aMix); |
1265 |
pContent->SetPixel( y, x, aMix ); |
1264 |
pAlpha->SetPixelIndex(y, x, nAlpha); |
1266 |
pAlpha->SetPixelIndex( y, x, nAlpha ); |
|
|
1267 |
} |
1265 |
} |
1268 |
} |
1266 |
|
1269 |
|
1267 |
// x == nW - 1, y == 0 |
1270 |
// x == nW - 1, y == 0 |
1268 |
pContent->SetPixel(y, x, aColorTopRight); |
1271 |
pContent->SetPixel(y, x, aColorTopRight); |
1269 |
pAlpha->SetPixelIndex(y, x, nAlpha); |
1272 |
pAlpha->SetPixelIndex(y, x, nAlpha); |
1270 |
|
1273 |
|
1271 |
for(y = 1; y < nH - 1; y++) // x == 0 and nW - 1 |
1274 |
if ( nH > 1 ) |
1272 |
{ |
1275 |
{ |
1273 |
Color aMixA(aColorTopLeft); |
1276 |
for ( y = 1; y < nH - 1; y++ ) // x == 0 and nW - 1 |
1274 |
Color aMixB(aColorTopRight); |
1277 |
{ |
|
|
1278 |
Color aMixA( aColorTopLeft ); |
1279 |
Color aMixB( aColorTopRight ); |
1275 |
|
1280 |
|
1276 |
aMixA.Merge(aColorBottomLeft, 255 - sal_uInt8((y * 255) / nH)); |
1281 |
aMixA.Merge( aColorBottomLeft, 255 - sal_uInt8( ( y * 255 ) / nH ) ); |
1277 |
pContent->SetPixel(y, 0, aMixA); |
1282 |
pContent->SetPixel( y, 0, aMixA ); |
1278 |
pAlpha->SetPixelIndex(y, 0, nAlpha); |
1283 |
pAlpha->SetPixelIndex( y, 0, nAlpha ); |
1279 |
|
1284 |
|
1280 |
aMixB.Merge(aColorBottomRight, 255 - sal_uInt8((y * 255) / nH)); |
1285 |
aMixB.Merge( aColorBottomRight, 255 - sal_uInt8( ( y * 255 ) / nH ) ); |
1281 |
pContent->SetPixel(y, nW - 1, aMixB); |
1286 |
pContent->SetPixel( y, nW - 1, aMixB ); |
1282 |
pAlpha->SetPixelIndex(y, nW - 1, nAlpha); |
1287 |
pAlpha->SetPixelIndex( y, nW - 1, nAlpha ); |
|
|
1288 |
} |
1283 |
} |
1289 |
} |
1284 |
|
1290 |
|
1285 |
x = 0; // x == 0, y == nH - 1 |
1291 |
x = 0; // x == 0, y == nH - 1 |
1286 |
pContent->SetPixel(y, x, aColorBottomLeft); |
1292 |
pContent->SetPixel(y, x, aColorBottomLeft); |
1287 |
pAlpha->SetPixelIndex(y, x, nAlpha); |
1293 |
pAlpha->SetPixelIndex(y, x, nAlpha); |
1288 |
|
1294 |
|
1289 |
for(x = 1; x < nW - 1; x++) // y == nH - 1 |
1295 |
if ( nW > 1 ) |
1290 |
{ |
1296 |
{ |
1291 |
Color aMix(aColorBottomLeft); |
1297 |
for ( x = 1; x < nW - 1; x++ ) // y == nH - 1 |
|
|
1298 |
{ |
1299 |
Color aMix( aColorBottomLeft ); |
1292 |
|
1300 |
|
1293 |
aMix.Merge(aColorBottomRight, 255 - sal_uInt8(((x - 0)* 255) / nW)); |
1301 |
aMix.Merge( aColorBottomRight, 255 - sal_uInt8( ( ( x - 0 ) * 255 ) / nW ) ); |
1294 |
pContent->SetPixel(y, x, aMix); |
1302 |
pContent->SetPixel( y, x, aMix ); |
1295 |
pAlpha->SetPixelIndex(y, x, nAlpha); |
1303 |
pAlpha->SetPixelIndex( y, x, nAlpha ); |
|
|
1304 |
} |
1296 |
} |
1305 |
} |
1297 |
|
1306 |
|
1298 |
// x == nW - 1, y == nH - 1 |
1307 |
// x == nW - 1, y == nH - 1 |