add the FlatBorder texture type
This commit is contained in:
parent
ff3d12175e
commit
6e07a64d33
3 changed files with 26 additions and 18 deletions
|
@ -107,6 +107,11 @@ Pixmap BImage::render_solid(const BTexture &texture) {
|
||||||
XDrawLine(display, pixmap, peninterlace.gc(), 0, i, width, i);
|
XDrawLine(display, pixmap, peninterlace.gc(), 0, i, width, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (texture.texture() & BTexture::FlatBorder) {
|
||||||
|
BPen penborder(texture.colorTo());
|
||||||
|
XDrawRectangle(display, pixmap, penborder.gc(), 0, 0, width-1, height-1);
|
||||||
|
}
|
||||||
|
|
||||||
if (texture.texture() & BTexture::Bevel1) {
|
if (texture.texture() & BTexture::Bevel1) {
|
||||||
if (texture.texture() & BTexture::Raised) {
|
if (texture.texture() & BTexture::Raised) {
|
||||||
XDrawLine(display, pixmap, penshadow.gc(),
|
XDrawLine(display, pixmap, penshadow.gc(),
|
||||||
|
|
|
@ -128,12 +128,14 @@ void BTexture::setDescription(const string &d) {
|
||||||
|
|
||||||
if (descr.find("sunken") != string::npos)
|
if (descr.find("sunken") != string::npos)
|
||||||
addTexture(BTexture::Sunken);
|
addTexture(BTexture::Sunken);
|
||||||
|
else if (descr.find("flatborder") != string::npos)
|
||||||
|
addTexture(BTexture::FlatBorder);
|
||||||
else if (descr.find("flat") != string::npos)
|
else if (descr.find("flat") != string::npos)
|
||||||
addTexture(BTexture::Flat);
|
addTexture(BTexture::Flat);
|
||||||
else
|
else
|
||||||
addTexture(BTexture::Raised);
|
addTexture(BTexture::Raised);
|
||||||
|
|
||||||
if (! (texture() & BTexture::Flat)) {
|
if (! (texture() & (BTexture::Flat | BTexture::FlatBorder))) {
|
||||||
if (descr.find("bevel2") != string::npos)
|
if (descr.find("bevel2") != string::npos)
|
||||||
addTexture(BTexture::Bevel2);
|
addTexture(BTexture::Bevel2);
|
||||||
else
|
else
|
||||||
|
|
|
@ -35,29 +35,30 @@ public:
|
||||||
enum Type {
|
enum Type {
|
||||||
// bevel options
|
// bevel options
|
||||||
Flat = (1l<<0),
|
Flat = (1l<<0),
|
||||||
Sunken = (1l<<1),
|
FlatBorder = (1l<<1),
|
||||||
Raised = (1l<<2),
|
Sunken = (1l<<2),
|
||||||
|
Raised = (1l<<3),
|
||||||
// textures
|
// textures
|
||||||
Solid = (1l<<3),
|
Solid = (1l<<4),
|
||||||
Gradient = (1l<<4),
|
Gradient = (1l<<5),
|
||||||
// gradients
|
// gradients
|
||||||
Horizontal = (1l<<5),
|
Horizontal = (1l<<6),
|
||||||
Vertical = (1l<<6),
|
Vertical = (1l<<7),
|
||||||
Diagonal = (1l<<7),
|
Diagonal = (1l<<8),
|
||||||
CrossDiagonal = (1l<<8),
|
CrossDiagonal = (1l<<9),
|
||||||
Rectangle = (1l<<9),
|
Rectangle = (1l<<10),
|
||||||
Pyramid = (1l<<10),
|
Pyramid = (1l<<11),
|
||||||
PipeCross = (1l<<11),
|
PipeCross = (1l<<12),
|
||||||
Elliptic = (1l<<12),
|
Elliptic = (1l<<13),
|
||||||
// bevel types
|
// bevel types
|
||||||
Bevel1 = (1l<<13),
|
Bevel1 = (1l<<14),
|
||||||
Bevel2 = (1l<<14),
|
Bevel2 = (1l<<15),
|
||||||
// inverted image
|
// inverted image
|
||||||
Invert = (1l<<15),
|
Invert = (1l<<16),
|
||||||
// parent relative image
|
// parent relative image
|
||||||
Parent_Relative = (1l<<16),
|
Parent_Relative = (1l<<17),
|
||||||
// fake interlaced image
|
// fake interlaced image
|
||||||
Interlaced = (1l<<17)
|
Interlaced = (1l<<18)
|
||||||
};
|
};
|
||||||
|
|
||||||
BTexture(const BaseDisplay * const _display = 0,
|
BTexture(const BaseDisplay * const _display = 0,
|
||||||
|
|
Loading…
Reference in a new issue