added TILED option
This commit is contained in:
parent
680407c294
commit
9f939d9af9
3 changed files with 13 additions and 6 deletions
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Texture.cc,v 1.5 2002/12/01 13:42:14 rathnor Exp $
|
||||
// $Id: Texture.cc,v 1.6 2003/08/12 11:44:19 fluxgen Exp $
|
||||
|
||||
#include "Texture.hh"
|
||||
|
||||
|
@ -89,6 +89,9 @@ void Texture::setFromString(const char * const texture_str) {
|
|||
|
||||
if (strstr(ts, "interlaced"))
|
||||
addType(Texture::INTERLACED);
|
||||
|
||||
if (strstr(ts, "tiled"))
|
||||
addType(Texture::TILED);
|
||||
}
|
||||
|
||||
delete [] ts;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Texture.hh,v 1.3 2003/04/28 22:23:41 fluxgen Exp $
|
||||
// $Id: Texture.hh,v 1.4 2003/08/12 11:44:19 fluxgen Exp $
|
||||
|
||||
#ifndef FBTK_TEXTURE_HH
|
||||
#define FBTK_TEXTURE_HH
|
||||
|
@ -64,9 +64,10 @@ public:
|
|||
enum {
|
||||
BEVEL1 = 0x04000,
|
||||
BEVEL2 = 0x08000, // bevel types
|
||||
INVERT = 0x010000, //inverted image
|
||||
INVERT = 0x10000, ///< inverted image
|
||||
PARENTRELATIVE = 0x20000,
|
||||
INTERLACED = 0x40000
|
||||
INTERLACED = 0x40000,
|
||||
TILED = 0x80000 ///< tiled pixmap
|
||||
};
|
||||
|
||||
Texture():m_type(0) { }
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: TextureRender.cc,v 1.3 2003/04/28 22:27:29 fluxgen Exp $
|
||||
// $Id: TextureRender.cc,v 1.4 2003/08/12 11:44:41 fluxgen Exp $
|
||||
|
||||
#include "TextureRender.hh"
|
||||
|
||||
|
@ -264,7 +264,10 @@ Pixmap TextureRender::renderPixmap(const FbTk::Texture &src_texture) {
|
|||
// copy src_texture's pixmap and
|
||||
// scale to fit our size
|
||||
FbPixmap new_pm(src_texture.pixmap());
|
||||
new_pm.scale(width, height);
|
||||
// if not tiled then scale it
|
||||
if (! (src_texture.type() & Texture::TILED))
|
||||
new_pm.scale(width, height);
|
||||
|
||||
return new_pm.release();
|
||||
}
|
||||
// return copy of pixmap
|
||||
|
|
Loading…
Reference in a new issue