solids should now work with offsets
This commit is contained in:
parent
6bcd6ddd6e
commit
32ec1d1e86
3 changed files with 7 additions and 7 deletions
|
@ -230,23 +230,23 @@ void highlight(pixel32 *x, pixel32 *y, gboolean raised)
|
||||||
+ (b << default_blue_shift);
|
+ (b << default_blue_shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gradient_solid(Appearance *l, int w, int h)
|
void gradient_solid(Appearance *l, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
PlanarSurface *sp = &l->surface.data.planar;
|
PlanarSurface *sp = &l->surface.data.planar;
|
||||||
int left = 0, top = 0, right = w - 1, bottom = h - 1;
|
int left = x, top = y, right = w - 1, bottom = h - 1;
|
||||||
|
|
||||||
if (sp->primary->gc == None)
|
if (sp->primary->gc == None)
|
||||||
color_allocate_gc(sp->primary);
|
color_allocate_gc(sp->primary);
|
||||||
XFillRectangle(ob_display, l->pixmap, sp->primary->gc
|
XFillRectangle(ob_display, l->pixmap, sp->primary->gc
|
||||||
, 0, 0, w, h);
|
, x, y, w, h);
|
||||||
|
|
||||||
if (l->surface.data.planar.interlaced) {
|
if (l->surface.data.planar.interlaced) {
|
||||||
if (sp->secondary->gc == None)
|
if (sp->secondary->gc == None)
|
||||||
color_allocate_gc(sp->secondary);
|
color_allocate_gc(sp->secondary);
|
||||||
for (i = 0; i < h; i += 2)
|
for (i = y; i < h; i += 2)
|
||||||
XDrawLine(ob_display, l->pixmap, sp->secondary->gc,
|
XDrawLine(ob_display, l->pixmap, sp->secondary->gc,
|
||||||
0, i, w, i);
|
x, i, w, i);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
switch (texture.relief()) {
|
switch (texture.relief()) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ void gradient_vertical(Surface *sf, int w, int h);
|
||||||
void gradient_horizontal(Surface *sf, int w, int h);
|
void gradient_horizontal(Surface *sf, int w, int h);
|
||||||
void gradient_diagonal(Surface *sf, int w, int h);
|
void gradient_diagonal(Surface *sf, int w, int h);
|
||||||
void gradient_crossdiagonal(Surface *sf, int w, int h);
|
void gradient_crossdiagonal(Surface *sf, int w, int h);
|
||||||
void gradient_solid(Appearance *l, int w, int h); /* needs access to pixmap */
|
void gradient_solid(Appearance *l, int x, int y, int w, int h);
|
||||||
void highlight(pixel32 *x, pixel32 *y, gboolean raised);
|
void highlight(pixel32 *x, pixel32 *y, gboolean raised);
|
||||||
|
|
||||||
#endif /* __gradient_h */
|
#endif /* __gradient_h */
|
||||||
|
|
|
@ -80,7 +80,7 @@ void x_paint(Window win, Appearance *l, int x, int y, int w, int h)
|
||||||
l->surface.data.planar.pixel_data = g_new(pixel32, w * h);
|
l->surface.data.planar.pixel_data = g_new(pixel32, w * h);
|
||||||
|
|
||||||
if (l->surface.data.planar.grad == Background_Solid)
|
if (l->surface.data.planar.grad == Background_Solid)
|
||||||
gradient_solid(l, w, h);
|
gradient_solid(l, x, y, w, h);
|
||||||
else gradient_render(&l->surface, w, h);
|
else gradient_render(&l->surface, w, h);
|
||||||
|
|
||||||
/*reduce depth here...
|
/*reduce depth here...
|
||||||
|
|
Loading…
Reference in a new issue