diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-11 13:42:27 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-11 13:42:27 +0000 |
commit | 0c8a93e6411035f6a1ca9e6537a6d569711cf4c3 (patch) | |
tree | a080ea2ffed0458c30e2395fb4442d4049b5dbcc /plugins/Clist_nicer/src/alphablend.cpp | |
parent | 181d16ce20429c13fd3d017d7eeed76059aa0d55 (diff) |
garbage collection: dead params, unused variables etc
git-svn-id: http://svn.miranda-ng.org/main/trunk@11328 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src/alphablend.cpp')
-rw-r--r-- | plugins/Clist_nicer/src/alphablend.cpp | 167 |
1 files changed, 76 insertions, 91 deletions
diff --git a/plugins/Clist_nicer/src/alphablend.cpp b/plugins/Clist_nicer/src/alphablend.cpp index b7e9d2e304..b61dd97446 100644 --- a/plugins/Clist_nicer/src/alphablend.cpp +++ b/plugins/Clist_nicer/src/alphablend.cpp @@ -446,98 +446,83 @@ void __inline gradientVertical(UCHAR *ubRedFinal, UCHAR *ubGreenFinal, UCHAR *ub void __fastcall IMG_RenderImageItem(HDC hdc, ImageItem *item, RECT *rc)
{
- BYTE l = item->bLeft, r = item->bRight, t = item->bTop, b = item->bBottom;
- LONG width = rc->right - rc->left;
- LONG height = rc->bottom - rc->top;
- BOOL isGlyph = (item->dwFlags & IMAGE_GLYPH) && g_glyphItem;
- HDC hdcSrc = isGlyph ? g_glyphItem->hdc : item->hdc;
- LONG srcOrigX = isGlyph ? item->glyphMetrics[0] : 0;
- LONG srcOrigY = isGlyph ? item->glyphMetrics[1] : 0;
-
- if (item->dwFlags & IMAGE_FLAG_DIVIDED) {
- // top 3 items
-
- GdiAlphaBlend(hdc, rc->left, rc->top, l, t, hdcSrc, srcOrigX, srcOrigY, l, t, item->bf);
- GdiAlphaBlend(hdc, rc->left + l, rc->top, width - l - r, t, hdcSrc, srcOrigX + l, srcOrigY, item->inner_width, t, item->bf);
- GdiAlphaBlend(hdc, rc->right - r, rc->top, r, t, hdcSrc, srcOrigX + (item->width - r), srcOrigY, r, t, item->bf);
-
- // middle 3 items
-
- GdiAlphaBlend(hdc, rc->left, rc->top + t, l, height - t - b, hdcSrc, srcOrigX, srcOrigY + t, l, item->inner_height, item->bf);
-
- if (item->dwFlags & IMAGE_FILLSOLID && item->fillBrush) {
- RECT rcFill;
- rcFill.left = rc->left + l; rcFill.top = rc->top +t;
- rcFill.right = rc->right - r; rcFill.bottom = rc->bottom - b;
- FillRect(hdc, &rcFill, item->fillBrush);
- }
- else
- GdiAlphaBlend(hdc, rc->left + l, rc->top + t, width - l - r, height - t - b, hdcSrc, srcOrigX + l, srcOrigY + t, item->inner_width, item->inner_height, item->bf);
+ BYTE l = item->bLeft, r = item->bRight, t = item->bTop, b = item->bBottom;
+ LONG width = rc->right - rc->left;
+ LONG height = rc->bottom - rc->top;
+ BOOL isGlyph = (item->dwFlags & IMAGE_GLYPH) && g_glyphItem;
+ HDC hdcSrc = isGlyph ? g_glyphItem->hdc : item->hdc;
+ LONG srcOrigX = isGlyph ? item->glyphMetrics[0] : 0;
+ LONG srcOrigY = isGlyph ? item->glyphMetrics[1] : 0;
+
+ if (item->dwFlags & IMAGE_FLAG_DIVIDED) {
+ // top 3 items
+
+ GdiAlphaBlend(hdc, rc->left, rc->top, l, t, hdcSrc, srcOrigX, srcOrigY, l, t, item->bf);
+ GdiAlphaBlend(hdc, rc->left + l, rc->top, width - l - r, t, hdcSrc, srcOrigX + l, srcOrigY, item->inner_width, t, item->bf);
+ GdiAlphaBlend(hdc, rc->right - r, rc->top, r, t, hdcSrc, srcOrigX + (item->width - r), srcOrigY, r, t, item->bf);
+
+ // middle 3 items
+
+ GdiAlphaBlend(hdc, rc->left, rc->top + t, l, height - t - b, hdcSrc, srcOrigX, srcOrigY + t, l, item->inner_height, item->bf);
+
+ if (item->dwFlags & IMAGE_FILLSOLID && item->fillBrush) {
+ RECT rcFill;
+ rcFill.left = rc->left + l; rcFill.top = rc->top + t;
+ rcFill.right = rc->right - r; rcFill.bottom = rc->bottom - b;
+ FillRect(hdc, &rcFill, item->fillBrush);
+ }
+ else
+ GdiAlphaBlend(hdc, rc->left + l, rc->top + t, width - l - r, height - t - b, hdcSrc, srcOrigX + l, srcOrigY + t, item->inner_width, item->inner_height, item->bf);
- GdiAlphaBlend(hdc, rc->right - r, rc->top + t, r, height - t - b, hdcSrc, srcOrigX + (item->width - r), srcOrigY + t, r, item->inner_height, item->bf);
+ GdiAlphaBlend(hdc, rc->right - r, rc->top + t, r, height - t - b, hdcSrc, srcOrigX + (item->width - r), srcOrigY + t, r, item->inner_height, item->bf);
- // bottom 3 items
+ // bottom 3 items
- GdiAlphaBlend(hdc, rc->left, rc->bottom - b, l, b, hdcSrc, srcOrigX, srcOrigY + (item->height - b), l, b, item->bf);
- GdiAlphaBlend(hdc, rc->left + l, rc->bottom - b, width - l - r, b, hdcSrc, srcOrigX + l, srcOrigY + (item->height - b), item->inner_width, b, item->bf);
- GdiAlphaBlend(hdc, rc->right - r, rc->bottom - b, r, b, hdcSrc, srcOrigX + (item->width - r), srcOrigY + (item->height - b), r, b, item->bf);
- }
- else {
- switch(item->bStretch) {
- case IMAGE_STRETCH_H:
- // tile image vertically, stretch to width
- {
- LONG top = rc->top;
-
- do {
- if (top + item->height <= rc->bottom) {
- GdiAlphaBlend(hdc, rc->left, top, width, item->height, hdcSrc, srcOrigX, srcOrigY, item->width, item->height, item->bf);
- top += item->height;
- }
- else {
- GdiAlphaBlend(hdc, rc->left, top, width, rc->bottom - top, hdcSrc, srcOrigX, srcOrigY, item->width, rc->bottom - top, item->bf);
- break;
- }
- } while (TRUE);
- break;
- }
- case IMAGE_STRETCH_V:
- // tile horizontally, stretch to height
- {
- LONG left = rc->left;
-
- do {
- if (left + item->width <= rc->right) {
- GdiAlphaBlend(hdc, left, rc->top, item->width, height, hdcSrc, srcOrigX, srcOrigY, item->width, item->height, item->bf);
- left += item->width;
- }
- else {
- GdiAlphaBlend(hdc, left, rc->top, rc->right - left, height, hdcSrc, srcOrigX, srcOrigY, rc->right - left, item->height, item->bf);
- break;
- }
- } while (TRUE);
- break;
- }
- case IMAGE_STRETCH_B:
- // stretch the image in both directions...
- GdiAlphaBlend(hdc, rc->left, rc->top, width, height, hdcSrc, srcOrigX, srcOrigY, item->width, item->height, item->bf);
- break;
- /*
- case IMAGE_STRETCH_V:
- // stretch vertically, draw 3 horizontal tiles...
- AlphaBlend(hdc, rc->left, rc->top, l, height, item->hdc, 0, 0, l, item->height, item->bf);
- AlphaBlend(hdc, rc->left + l, rc->top, width - l - r, height, item->hdc, l, 0, item->inner_width, item->height, item->bf);
- AlphaBlend(hdc, rc->right - r, rc->top, r, height, item->hdc, item->width - r, 0, r, item->height, item->bf);
- break;
- case IMAGE_STRETCH_H:
- // stretch horizontally, draw 3 vertical tiles...
- AlphaBlend(hdc, rc->left, rc->top, width, t, item->hdc, 0, 0, item->width, t, item->bf);
- AlphaBlend(hdc, rc->left, rc->top + t, width, height - t - b, item->hdc, 0, t, item->width, item->inner_height, item->bf);
- AlphaBlend(hdc, rc->left, rc->bottom - b, width, b, item->hdc, 0, item->height - b, item->width, b, item->bf);
- break;
- */
- default:
- break;
- }
- }
+ GdiAlphaBlend(hdc, rc->left, rc->bottom - b, l, b, hdcSrc, srcOrigX, srcOrigY + (item->height - b), l, b, item->bf);
+ GdiAlphaBlend(hdc, rc->left + l, rc->bottom - b, width - l - r, b, hdcSrc, srcOrigX + l, srcOrigY + (item->height - b), item->inner_width, b, item->bf);
+ GdiAlphaBlend(hdc, rc->right - r, rc->bottom - b, r, b, hdcSrc, srcOrigX + (item->width - r), srcOrigY + (item->height - b), r, b, item->bf);
+ }
+ else {
+ switch (item->bStretch) {
+ case IMAGE_STRETCH_H:
+ // tile image vertically, stretch to width
+ {
+ LONG top = rc->top;
+
+ do {
+ if (top + item->height <= rc->bottom) {
+ GdiAlphaBlend(hdc, rc->left, top, width, item->height, hdcSrc, srcOrigX, srcOrigY, item->width, item->height, item->bf);
+ top += item->height;
+ }
+ else {
+ GdiAlphaBlend(hdc, rc->left, top, width, rc->bottom - top, hdcSrc, srcOrigX, srcOrigY, item->width, rc->bottom - top, item->bf);
+ break;
+ }
+ }
+ while (true);
+ break;
+ }
+ case IMAGE_STRETCH_V: // tile horizontally, stretch to height
+ {
+ LONG left = rc->left;
+
+ do {
+ if (left + item->width <= rc->right) {
+ GdiAlphaBlend(hdc, left, rc->top, item->width, height, hdcSrc, srcOrigX, srcOrigY, item->width, item->height, item->bf);
+ left += item->width;
+ }
+ else {
+ GdiAlphaBlend(hdc, left, rc->top, rc->right - left, height, hdcSrc, srcOrigX, srcOrigY, rc->right - left, item->height, item->bf);
+ break;
+ }
+ }
+ while (TRUE);
+ break;
+ }
+ case IMAGE_STRETCH_B:
+ // stretch the image in both directions...
+ GdiAlphaBlend(hdc, rc->left, rc->top, width, height, hdcSrc, srcOrigX, srcOrigY, item->width, item->height, item->bf);
+ break;
+ }
+ }
}
|