• Sonuç bulunamadı

A text, image, and graphics editor

N/A
N/A
Protected

Academic year: 2021

Share "A text, image, and graphics editor"

Copied!
1
0
0

Yükleniyor.... (view fulltext now)

Tam metin

(1)

('ompul. & Graphtcs Vol. 15, No. I, pp. 57-66, 1991 Printed in Great Britain.

A TEXT, IMAGE, A N D G R A P H I C S

A H M E T C O ~ A R a n d B O L E N T ( ~ Z G ~ C 0097-8493/91 $3.00 + .00 (c~ 1991 Pergamon Press plc

Technical Section

E D I T O R

Bilkent University, Department of Computer Engineering and Information Science, Ankara, Turkey

I. I N T R O D U C T I O N

In this paper a system for the manipulation of text, image, and graphics items is presented. There are many products that manipulate text, image, or graphics data independently, but most of these systems are unable to manipulate them in a unified d o c u m e n t [9, 11 ].

With the introduction of Smalltalk[ 10], Star[ 16 ], Lisa[19], Macintosh[18], and TEX[14] it has become possible to mix text and graphics data in a single doc- ument. The O D A / O D 1 F standard has also been de- veloped for "the preparation, processing and inter- change of text as used in office documents" [ 12 ]. The system that we have implemented is based on similar ideas but it allows the documents to be created using relational geometry [ 27 ], as well. Any change in a given

A simple example of setting color of an item is dis- cussed next to clarify the effects of the attributes. An attribute with the n a m e

Color

and an integer value between 0 and 255 acting as an index to a colormap table are to be used. The C code that concatenates this information to the display parameter,

pixel operation

is given below. The attribute structure is as defined in Fig. 2 and the pixel operation specifies a bitwise logical operation (like AND, OR, XOR, etc.) a m o n g the cor- responding bits of the item to be displayed and the image in the frame buffer of the workstation as well as the color to be used for painting pixels. P I X _ C O L O R [ 2 3 ] is a system defined macro that is used for inserting color information into the pixel op- eration.

i f (A= ( ~ t r u c t a t t r i b , ) e x i s t _ a t t r ( i t e m ,

" ' C o l o r ' ' ) )

p i x e l _ o p e r a t i o n [= PIX_COLOR(A->attrval);

data item causes the relational expressions existing in a d o c u m e n t to be reevaluated and this makes our sys- tem an interactive W Y S I W Y G d o c u m e n t editor [4, 8 ]. Currently, we are using this system for documenting various instances of animations generated by an ani- mation package developed at Bilkent University [ 6 ]. We are also planning to enhance this system for storing a n i m a t i o n sequence definitions, timings, etc. The re- lations are usually based on positional attributes, but facilities for defining relations on text valued attributes are also provided (Fig. 1 ).

When a user selects any one of the items on the screen a m e n u of the attributes of that item is presented to the user and the selection of the attribute to be up- dated is done through this menu. Insertion of new at- tributes to a selected item, especially for defining re- lations, can be done through a panel item as well. A detailed example for defining a "Bicycle" with relations is given in Section 3. Figure 2 shows a graphical object with its associated attributes and the data structures used for storing these attributes. For each data type

(i.e.,

text, image, and graphics) there is a special dis- play procedure

(e.g..

Graphics__Display( ), Im- age_Display( ) and TexL__Display ( )) that is called with the item to be displayed as its argument. This procedure uses the item's attributes while displaying it on the screen. This type of an implementation is general and m o d u l a r in nature and addition of new facilities to the system is greatly simplified. Definition of new item types, especially new graphics items, is possible and the method for this is discussed in Sec- tion 3.1.

It is possible to define each attribute either by an integer value a n d / o r a string expression. In order to allow users to define their relations using expressions, a simple language with special primitives is used. A simple relation is given below with an expression used for defining two items to have the same color.

C o l o r - " o t h e r i t e m n a m e ' C o l o r \ i v a l

The quotation marks preceding words denote that those words are not evaluated and pushed into a stack and are later used by other c o m m a n d s as parameters. The backslash character precedes the c o m m a n d s of the language (as in the TEX c o n v e n t i o n [ 1 4 ] ) . The

\ival

c o m m a n d that stands for

item value,

pops two strings from stack. The first popped string is the attri- bute n a m e and the second one is the item name that is unique for each item. The item and its corresponding attribute are searched by the system and the evaluated value of the attribute is pushed to the stack. Since eval- uation of expressions with a cyclic relation set can cause infinite loops, checks are done by the system while evaluating expressions.

By setting various relations between different data items of any type, users will not have to deal with details that they have already defined. The implication of this is when a change in only one data item is made, all other data items might be updated accordingly if this is specified in the relation set. One such relationship is defined for inserting text into a text data that causes the rest of the line to be shifted right and if the right justification function is already defined for that text 57

Referanslar

Benzer Belgeler

In transient heat conduction, since evaluation of infinite seires is tedious, a correction factor between one term approximation and exact solution have been looked

• The first book of the Elements necessarily begin with headings Definitions, Postulates and Common Notions.. In calling the axioms Common Notions Euclid followed the lead of

cells that have cilia have many - covering the surface flagella move with whip-like movements to propel the cell cilia have a more regular stroke and groups of cilia appear to.. move

Extensive property is the one that is dependent on the mass of the system such as volume, kinetic energy and potential energy.. Specific properties are

In this context, this study aimed to investigate the relationship between attach- ment insecurity (high attachment anxiety or avoidance) and marital satisfaction and

The lymphocyte counts of group 4 (obese OSAS group) were the lowest among all groups; these values were lower than the lymphocyte counts of groups 1 (control group),

Although it caused femur neck fracture, it didn’t cause additional organ injuries like femoral vascular or nervous injury, or bladder injury.. In this case, the patient,

However, our study determined no differences in urine pH but detected lower urine density in enuretic cases compared to the control group.. Clearly, more