fixed setRotate function
This commit is contained in:
parent
bf6662921e
commit
6073c44a8e
1 changed files with 7 additions and 4 deletions
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: XFontImp.hh,v 1.2 2002/12/01 13:42:15 rathnor Exp $
|
// $Id: XFontImp.hh,v 1.3 2002/12/09 22:10:01 fluxgen Exp $
|
||||||
|
|
||||||
#ifndef FBTK_XFONTIMP_HH
|
#ifndef FBTK_XFONTIMP_HH
|
||||||
#define FBTK_XFONTIMP_HH
|
#define FBTK_XFONTIMP_HH
|
||||||
|
@ -40,6 +40,8 @@ public:
|
||||||
void drawText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y) const;
|
void drawText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y) const;
|
||||||
bool loaded() const { return m_fontstruct != 0; }
|
bool loaded() const { return m_fontstruct != 0; }
|
||||||
void rotate(float angle);
|
void rotate(float angle);
|
||||||
|
/// enable/disable rotation witout alloc/dealloc rotfont structures
|
||||||
|
void setRotate(bool val) { m_rotate = val; }
|
||||||
private:
|
private:
|
||||||
void freeRotFont();
|
void freeRotFont();
|
||||||
void drawRotText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y) const;
|
void drawRotText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y) const;
|
||||||
|
@ -71,9 +73,10 @@ private:
|
||||||
|
|
||||||
XRotCharStruct per_char[95];
|
XRotCharStruct per_char[95];
|
||||||
};
|
};
|
||||||
XRotFontStruct *m_rotfont;
|
XRotFontStruct *m_rotfont; ///< rotated font structure
|
||||||
XFontStruct *m_fontstruct;
|
XFontStruct *m_fontstruct; ///< X font structure
|
||||||
float m_angle;
|
float m_angle; ///< the rotated angle
|
||||||
|
bool m_rotate; ///< used to disable/enable rotation temprarly without reallocating m_rotfont
|
||||||
};
|
};
|
||||||
|
|
||||||
}; // end namespace FbTk
|
}; // end namespace FbTk
|
||||||
|
|
Loading…
Reference in a new issue