Bugs item #783101, was opened at 2003-08-04 23:04
Message generated for change (Comment added) made by bradleyhughes
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=428680&aid=783101&group_id=40696
Category: Appearance/Rendering
Group: CVS
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Adrian J Sweet (adriansweet)
>Assigned to: Bradley T. Hughes (bradleyhughes)
Summary: vertical gradient doesn't work
Initial Comment:
The vertical gradient doesn't work in the current CVS
release (03 Aug).
All you get a solid block of the 'from' colour,
interlaced v. gradient doesn't work either.
I've done a quick patch, see below.
Adrian
diff -pruN blackbox-orig/lib/Image.cc blackbox/lib/Image.cc
--- blackbox-orig/lib/Image.cc 2003-04-28
14:28:20.000000000 +0100
+++ blackbox/lib/Image.cc 2003-08-04
21:46:43.000000000 +0100
@@ -1132,14 +1132,14 @@ void bt::Image::vgradient(const
Color &f
if (interlaced) {
// faked interlacing effect
for (y = 0; y < height; ++y) {
- p->red = static_cast<unsigned char>(yr);
- p->green = static_cast<unsigned char>(yg);
- p->blue = static_cast<unsigned char>(yb);
+ data->red = static_cast<unsigned char>(yr);
+ data->green = static_cast<unsigned char>(yg);
+ data->blue = static_cast<unsigned char>(yb);
if (y & 1) {
- p->red = (p->red >> 1) + (p->red >> 2);
- p->green = (p->green >> 1) + (p->green >> 2);
- p->blue = (p->blue >> 1) + (p->blue >> 2);
+ data->red = (data->red >> 1) + (data->red
>> 2);
+ data->green = (data->green >> 1) +
(data->green >> 2);
+ data->blue = (data->blue >> 1) + (data->blue
>> 2);
}
for (x = 0; x < width; ++x) *p++ = *data;
@@ -1151,9 +1151,9 @@ void bt::Image::vgradient(const
Color &f
} else {
// normal vgradient
for (y = 0; y < height; ++y) {
- p->red = static_cast<unsigned char>(yr);
- p->green = static_cast<unsigned char>(yg);
- p->blue = static_cast<unsigned char>(yb);
+ data->red = static_cast<unsigned char>(yr);
+ data->green = static_cast<unsigned char>(yg);
+ data->blue = static_cast<unsigned char>(yb);
for (x = 0; x < width; ++x) *p++ = *data;
----------------------------------------------------------------------
>Comment By: Bradley T. Hughes (bradleyhughes)
Date: 2004-03-03 16:19
Message:
Logged In: YES
user_id=459209
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=428680&aid=783101&group_id=40696
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
List archives: http://asgardsrealm.net/lurker/splash/index.html
Trouble? Contact [EMAIL PROTECTED]