DBaddText

Top  Previous  Next

Inserts a new text in the object.

Then the text element is the last element in the list of the elements. If the object is selected, the text is also indicated on generating. Texts have a big number of parametres. The sign key gives the line kind for the text, x, y and z the position, alpha and beta the inclination of the text, textart the style, e.g., italics, texthoehe the size of the text.

Parametre

object (POBJECT) [IN]

This is the trading of the object in which the new text should be put on. The text is arranged as the last element in the list of the elements.

zeichenschluessel (sign-key) [IN]

The sign key is possibly comparable with the colour of the line, however, can appear according to issue medium also as a line kind.

x (STANDS IN) [IN]

y (STANDS IN) [IN]

z (STANDS IN) [IN]

Co-ordinate of the position in which the text is arranged. The state line, if available, is evaluated relatively to this point. There are no 2-dimensional texts. When required the z value must be booked with any value.

alpha (CORNER) [IN]

beta (CORNER) [IN]

A text can be turned in the horizontal level (alpha) and in vertical (beta). This rotation is only considered if no state line is given.

schraffur (surface-key) [IN]

No notion what has to do this wers knows, it says me please.

textart (USHORT) [IN]

If the appearance of the text brags, possibly whether the text should be drawn as an Outline or in italics.

texthoehe (USHORT) [IN]

Herewith the height of the text is fixed. The value is given in 1/100 mm and is to be understood, in addition, relatively to the global variable text graduation. This gives the graduation in which the text has the given height. If the text has a height of 10/100 mm in a plan with text graduation in 1000, he must have on a plot with graduation 1:4000 a height of 2,5/100 mm.

standlinienlaenge (STANDS IN) [IN]

If this value is not 0, he gives how broadly the text should be shown. This value is only considered if the state line is a ZERO. The unity of this value is not known yet.

textString (char *) [IN]

Here the real text is filed. This text can be long in contrast to the Gradis-Implementation arbitrarily. Indeed, texts which are longer than 32 signs do not become compatibly Gradis.

standlinie (PSTRING_ELEMENT) [IN]

Here a string element with which the text can be put on a given state line can be given. The text also follows by changes of the text string the given course. The co-ordinates of the state line are interpreted relatively to the text position.

doExpand (int) [IN]

If here FALSE stands, it concerns a normal text. If here TRUE is put down, all sign chains appearing in the text <>are substituted by the pattern „%attr %“ by the contents of the attribute <attr>. This attribute is taken from the object to which also this text belongs.

textmode (USHORT) [IN]

if the worth TEXT_MODE_LEFT, TEXT_MODE_CENTER and TEXT_MODE_RIGHT can contain one. Then the text is positioned on the state line accordingly.

Result

(TEXT_ELEMENT) [OUT]

The trading of the anew generated text is delivered. If a mistake has appeared, becomes instead of this ZERO read result returned.

Declaration

#include "database.h"

 

PTEXT_ELEMENT DLLENTRY DBaddText (

POBJECT object,

Sign-key zeichenschluessel,

STAND-IN x,

STAND-IN y,

STAND-IN z,

CORNER alpha,

CORNER beta,

Surface-key schraffur,

USHORT textart,

USHORT texthoehe,

stand in standlinienlaenge,

char * textString,

PSTRING_ELEMENT standlinie,

int doExpand,

USHORT textmode

);

Constants

TEXT_MODE_CENTER

TEXT_MODE_LEFT

TEXT_MODE_RIGHT