Contact us Heritage collections Image license terms
HOME ACL ACD ICF SUS DCS G&A STARLINK Literature
Further reading □ ForewordContentsPrefacePrologueAcknowledgementsParticipants1. IntroductionA. GuedjB. HopgoodC. CrestinD. WarmanE. SabinF. EncarnacaoG. DunnH. BonoI. NewellJ. FoleyK. FoleyL. SanchaM. SanchaN. Sancha2. Working documentsCurrent positionGraphics primitivesCoreAttributesStructureMethodology: StructureDesignInputTransformationsFormal SpecificationConceptual FrameworkIFIP ReportRecommendationsFuture
C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACDLiteratureBooksMethodology in Computer Graphics
ACDLiteratureBooksMethodology in Computer Graphics
ACL ACD C&A INF CCD CISD Archives
Further reading

ForewordContentsPrefacePrologueAcknowledgementsParticipants1. IntroductionA. GuedjB. HopgoodC. CrestinD. WarmanE. SabinF. EncarnacaoG. DunnH. BonoI. NewellJ. FoleyK. FoleyL. SanchaM. SanchaN. Sancha2. Working documentsCurrent positionGraphics primitivesCoreAttributesStructureMethodology: StructureDesignInputTransformationsFormal SpecificationConceptual FrameworkIFIP ReportRecommendationsFuture

On the Concept of Attributes

Definition

Segments Attributes (SA) are properties of segments which may be altered after the segment has been closed (e.g. visibility) - segments might be switched on and off (posted and unposted).

Drawing Attributes (DA) are attributes possessed by individual drawing elements (e.g. lines). These may not be individually altered after the element has been created - e.g. colour, it is conceivable that individual lines might have colour as an attribute.

Problems

  1. How to specify the values of these attributes.
  2. How to specify the scope of these attributes.
  3. What is the interaction between the two types of attributes.
  4. What attributes do we have.

Observations

  1. Things are a lot easier if the SA's and DA's are disjoint.
  2. Let us divide attributes into 3 classes:
    • PDA Pure DA's which do not apply to segments
    • PSA Pure SA's which do not apply to drawing elements
    • CA Common attributes which apply to both
  3. When a segment is opened, all SA's and DA's are set to default values.
  4. PDA's may be set to apply to all following drawing elements until another setting, or the end of the segment is reached. They cannot be modified.
  5. PSA's may be set at any time and apply to the whole segment.
  6. If a CA is used only (the intended use) as a PDA or PSA, then it should behave exactly as a PDA or PSA.
  7. If a CA is used as a CA then we have two possible interpretations:
    1. The use as a SA overrides the use as a DA (e.g. if a segment was drawn with red and blue lines, and then the segment attribute was modified to be red, then the whole segment becomes red).
    2. The use as a DA overrides the use as a SA, that is only the initial default setting of the attribute is altered (e.g. if a segment consisted of a part with the defaults unchanged and then a red part, then setting the segment to blue would simply make the first part blue).
  8. What attributes might we have?
    • Colour
    • width
    • Intensity
    • Dottedness/Dashness/Solidity
    • Visibility (Post/Unpost)
    • Highlight
    • Pen sensitivity
    • Stored/refreshed
  9. CA's are so nasty ... that we should not have any! i.e. we should partition the attributes in 8 into PDA's and PSA's.
  10. Let us call the current value of the PSA's the segment status:
    • 0 invisible
    • 1 visible-refreshed
    • 2 visible-stored
    • 3 visible-highlighted
    i.e. the function is set segment status (nseg, istatus)
  11. Drop pen sensitivity - because:
    1. It is too device dependent?
    2. It can be done outside the graphics system (i.e. the application programmer can ignore any pen hits that he does not want).
  12. PDA's - we are left with a hotch-potch of device dependent attributes, if we provide functions which operate on these attributes directly then the programs using them will be device dependent. The way out of this is to use one level of indirection in the same way as in operating systems (e.g. select output stream n - where the correspondence between physical device and stream number is defined externally perhaps in the job description). Thus:
    select line style (n)
    
    Where a table of line types giving colour/intensity/hardware mode etc. is set up externally. Then, to go from one device to another, the table and not the program is changed.
⇑ Top of page
© Chilton Computing and UKRI Science and Technology Facilities Council webmaster@chilton-computing.org.uk
Our thanks to UKRI Science and Technology Facilities Council for hosting this site