2001-02-13 13:28:32 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
|
|
|
|
#ifndef MATH_SUPPORT_H
|
|
|
|
#define MATH_SUPPORT_H
|
|
|
|
|
2001-07-09 16:59:57 +00:00
|
|
|
#include "math_defs.h"
|
2001-07-20 14:54:13 +00:00
|
|
|
#include "LString.h"
|
2001-02-13 13:28:32 +00:00
|
|
|
|
|
|
|
class Painter;
|
|
|
|
|
|
|
|
extern char const * math_font_name[];
|
|
|
|
extern char const * latex_mathspace[];
|
|
|
|
|
2001-07-20 14:54:13 +00:00
|
|
|
int mathed_char_height(MathTextCodes type, MathStyles size, unsigned char c,
|
2001-07-13 11:32:22 +00:00
|
|
|
int & asc, int & des);
|
2001-07-20 14:54:13 +00:00
|
|
|
void mathed_char_dim(MathTextCodes type, MathStyles size, unsigned char c,
|
2001-07-13 11:32:22 +00:00
|
|
|
int & asc, int & des, int & wid);
|
2001-08-03 17:55:10 +00:00
|
|
|
int mathed_char_width(MathTextCodes type, MathStyles size, unsigned char c);
|
|
|
|
int mathed_char_ascent(MathTextCodes type, MathStyles size, unsigned char c);
|
|
|
|
int mathed_char_descent(MathTextCodes type, MathStyles size, unsigned char c);
|
2001-02-13 13:28:32 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
void mathed_draw_deco(Painter & pain, int x, int y, int w, int h, int code);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
2001-07-20 14:54:13 +00:00
|
|
|
void mathed_string_dim(MathTextCodes type, MathStyles size, string const & s,
|
2001-06-25 00:06:33 +00:00
|
|
|
int & asc, int & des, int & wid);
|
2001-07-20 14:54:13 +00:00
|
|
|
int mathed_string_height(MathTextCodes type, MathStyles size, string const & s,
|
2001-06-25 00:06:33 +00:00
|
|
|
int & asc, int & des);
|
2001-08-03 17:55:10 +00:00
|
|
|
|
2001-07-20 14:54:13 +00:00
|
|
|
int mathed_string_width(MathTextCodes type, MathStyles size, string const & s);
|
2001-08-03 17:55:10 +00:00
|
|
|
int mathed_string_ascent(MathTextCodes type, MathStyles size, string const & s);
|
|
|
|
int mathed_string_descent(MathTextCodes type, MathStyles size, string const & s);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
2001-07-20 14:54:13 +00:00
|
|
|
bool MathIsAlphaFont(MathTextCodes x);
|
|
|
|
bool MathIsSymbol(MathTextCodes x);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
2001-07-20 14:54:13 +00:00
|
|
|
void drawStr(Painter & pain, MathTextCodes type, MathStyles siz,
|
2001-06-25 00:06:33 +00:00
|
|
|
int x, int y, string const & s);
|
2001-07-20 14:54:13 +00:00
|
|
|
void drawChar(Painter & pain, MathTextCodes type, MathStyles siz,
|
2001-06-25 00:06:33 +00:00
|
|
|
int x, int y, char c);
|
2001-07-13 09:10:59 +00:00
|
|
|
|
2001-07-20 14:54:13 +00:00
|
|
|
void math_font_max_dim
|
|
|
|
(MathTextCodes code, MathStyles siz, int & asc, int & desc);
|
|
|
|
|
2001-02-13 13:28:32 +00:00
|
|
|
#endif
|