added TILED option
fluxgen fluxgen
3 files changed,
13 insertions(+),
6 deletions(-)
M
src/FbTk/Texture.cc
→
src/FbTk/Texture.cc
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 @@ addType(Texture::BEVEL1);
if (strstr(ts, "interlaced")) addType(Texture::INTERLACED); + + if (strstr(ts, "tiled")) + addType(Texture::TILED); } delete [] ts;
M
src/FbTk/Texture.hh
→
src/FbTk/Texture.hh
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 @@
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) { }
M
src/FbTk/TextureRender.cc
→
src/FbTk/TextureRender.cc
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 @@ height != src_texture.pixmap().height()) {
// 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