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);
|
||||
}
|
||||
|
||||
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::Raised) {
|
||||
XDrawLine(display, pixmap, penshadow.gc(),
|
||||
|
|
|
@ -128,12 +128,14 @@ void BTexture::setDescription(const string &d) {
|
|||
|
||||
if (descr.find("sunken") != string::npos)
|
||||
addTexture(BTexture::Sunken);
|
||||
else if (descr.find("flatborder") != string::npos)
|
||||
addTexture(BTexture::FlatBorder);
|
||||
else if (descr.find("flat") != string::npos)
|
||||
addTexture(BTexture::Flat);
|
||||
else
|
||||
addTexture(BTexture::Raised);
|
||||
|
||||
if (! (texture() & BTexture::Flat)) {
|
||||
if (! (texture() & (BTexture::Flat | BTexture::FlatBorder))) {
|
||||
if (descr.find("bevel2") != string::npos)
|
||||
addTexture(BTexture::Bevel2);
|
||||
else
|
||||
|
|
|
@ -35,29 +35,30 @@ public:
|
|||
enum Type {
|
||||
// bevel options
|
||||
Flat = (1l<<0),
|
||||
Sunken = (1l<<1),
|
||||
Raised = (1l<<2),
|
||||
FlatBorder = (1l<<1),
|
||||
Sunken = (1l<<2),
|
||||
Raised = (1l<<3),
|
||||
// textures
|
||||
Solid = (1l<<3),
|
||||
Gradient = (1l<<4),
|
||||
Solid = (1l<<4),
|
||||
Gradient = (1l<<5),
|
||||
// gradients
|
||||
Horizontal = (1l<<5),
|
||||
Vertical = (1l<<6),
|
||||
Diagonal = (1l<<7),
|
||||
CrossDiagonal = (1l<<8),
|
||||
Rectangle = (1l<<9),
|
||||
Pyramid = (1l<<10),
|
||||
PipeCross = (1l<<11),
|
||||
Elliptic = (1l<<12),
|
||||
Horizontal = (1l<<6),
|
||||
Vertical = (1l<<7),
|
||||
Diagonal = (1l<<8),
|
||||
CrossDiagonal = (1l<<9),
|
||||
Rectangle = (1l<<10),
|
||||
Pyramid = (1l<<11),
|
||||
PipeCross = (1l<<12),
|
||||
Elliptic = (1l<<13),
|
||||
// bevel types
|
||||
Bevel1 = (1l<<13),
|
||||
Bevel2 = (1l<<14),
|
||||
Bevel1 = (1l<<14),
|
||||
Bevel2 = (1l<<15),
|
||||
// inverted image
|
||||
Invert = (1l<<15),
|
||||
Invert = (1l<<16),
|
||||
// parent relative image
|
||||
Parent_Relative = (1l<<16),
|
||||
Parent_Relative = (1l<<17),
|
||||
// fake interlaced image
|
||||
Interlaced = (1l<<17)
|
||||
Interlaced = (1l<<18)
|
||||
};
|
||||
|
||||
BTexture(const BaseDisplay * const _display = 0,
|
||||
|
|
Loading…
Reference in a new issue