Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Ewering <blender@instinctive.de>2005-06-18 01:04:27 +0400
committerAlexander Ewering <blender@instinctive.de>2005-06-18 01:04:27 +0400
commit97df61a7e5391e302d1a5f9069cf0b388f85e0c8 (patch)
tree1c0004b1efa87ebf22ffe014d836033ac2f2ac30 /source/blender/makesdna
parent9ee2a1ee095a1b9ce02b5ac30a50a4446f513ddc (diff)
Initial commit for new text object.
Important notes: - Full compatibility with old text objects not fully restored (word spacing will be 0.0, need to set it manually to 1.0), will either need version upgrade to 238 or a hack. Will check. - lorem.c (about to be committed) contains BF copyright notice, but as BF did not exist a few hundred years ago, probably best to remove it :) - If you notice any cross-platform issues (especially beloved windows), please report - A few tiny warnings left, I will fix those issues still. The rest has been said already - so have fun testing. And please do! === Reminder: === Documentation at http://blender.instinctive.de/docs/textobject.txt ===
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_curve_types.h47
-rw-r--r--source/blender/makesdna/DNA_vfont_types.h3
2 files changed, 47 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 0713f770dc4..4482d24ba06 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -40,6 +40,8 @@
#include "DNA_vec_types.h"
#include "DNA_ID.h"
+#define MAXTEXTBOX 256 /* used in readfile.c and editfont.c */
+
struct BoundBox;
struct Object;
struct Ipo;
@@ -101,8 +103,21 @@ typedef struct Nurb {
BPoint *bp;
BezTriple *bezt;
+ int charidx;
+ int pad;
} Nurb;
+typedef struct CharInfo {
+ short kern;
+ short mat_nr;
+ char flag;
+ char pad;
+ short pad2;
+} CharInfo;
+
+typedef struct TextBox {
+ float x, y, w, h;
+} TextBox;
typedef struct Curve {
ID id;
@@ -135,12 +150,26 @@ typedef struct Curve {
/* font part */
short len, lines, pos, spacemode;
- float spacing, linedist, shear, fsize;
+ float spacing, linedist, shear, fsize, wordspace;
float xof, yof;
-
- char *str, family[24];
+ float linewidth;
+
+ char *str;
+ char family[24];
struct VFont *vfont;
+ struct VFont *vfontb;
+ struct VFont *vfonti;
+ struct VFont *vfontbi;
+ int sepchar;
+
+ int totbox, actbox, pad;
+ struct TextBox *tb;
+
+ int selstart, selend;
+
+ struct CharInfo *strinfo;
+ struct CharInfo curinfo;
} Curve;
typedef struct IpoCurve {
@@ -177,6 +206,7 @@ typedef struct IpoCurve {
#define CU_NOPUNOFLIP 64
#define CU_STRETCH 128
#define CU_OFFS_PATHDIST 256
+#define CU_FAST 512 /* Font: no filling inside editmode */
/* spacemode */
#define CU_LEFT 0
@@ -204,5 +234,16 @@ typedef struct IpoCurve {
#define HD_VECT 2
#define HD_ALIGN 3
+/* *************** CHARINFO **************** */
+
+/* flag */
+#define CU_STYLE (1+2)
+#define CU_BOLD 1
+#define CU_ITALIC 2
+#define CU_UNDERLINE 4
+#define CU_WRAP 8 /* wordwrap occured here */
+
+
+
#endif
diff --git a/source/blender/makesdna/DNA_vfont_types.h b/source/blender/makesdna/DNA_vfont_types.h
index 5f9e3f61446..df9279d6243 100644
--- a/source/blender/makesdna/DNA_vfont_types.h
+++ b/source/blender/makesdna/DNA_vfont_types.h
@@ -55,6 +55,9 @@ typedef struct VFont {
#define FO_CURSUP 2
#define FO_CURSDOWN 3
#define FO_DUPLI 4
+#define FO_PAGEUP 8
+#define FO_PAGEDOWN 9
+#define FO_SELCHANGE 10
#endif