4.1 Pixrect Reference Manual

4.1 Pixrect Reference Manual

4.1 Pixrect Reference Manual ._---------- Part Number: 800-4835-10 Revision A of 5 January, 1990 The Sun logo, Sun Microsystems, and Sun Workstation are registered trademarks of Sun Microsystems, Inc. Sun, Sun-2, Sun-3, Sun-4, Sun386i, SunInstali, SunOS, SunView, NFS, NeWS, and SPARC are trademarks of Sun Microsystems, Inc. UNIX is a registered trademark of AT&T. All other products or services mentioned in this document are identified by the trademarks or service marks of their respective companies or organizations. Intel ® is a registered trademark of Intel COIpOration. Copyright © 1990 Sun Microsystems, Inc. - Printed in U.S.A. All rights reserved. No part of this work covered by copyright hereon may be reproduced in any form or by any means - graphic, electronic, or mechanical - including photocopying, recording, taping, or storage in an infonnation retrieval system, without the prior written pennission of the copyright owner. Restricted rights legend: use, duplication, or disclosure by the U.S. government is subject to restrictions set forth in subparagraph (c)(1 )(ii) of the Rights in Technical Data and Computer Software clause at DFARS 52.227-7013 and in similar clauses in the FAR and NASA FAR Supplement. The Sun Graphical User Interface was developed by Sun Microsystems Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun's licensees. Contents Chapter 1 Introduction .......................................................................................................... 3 Limitations ................................................................ ............................................. ........... 3 1.1. Overview .............................................................................................................................. 3 1.2. Important Concepts ........................................................................................................ 4 1.3. Using Pixrects .................................................................................................................... 5 Primary Pixrect .......... ............ ............... ......... ............... ........................ ......... ...... ..... 6 Secondary Pixrect ...................... ......... ...... ......... ............... ......... ...... ....................... 6 Memory Pixrect ............................................................................................. ........... 6 Basic Example ................................................................................................................ 7 Compiling .................................................................................................................... 7 Pixrect lint Library ............................................................................................... 7 1.4. Pixrect Data Structures ................................................................................................. 8 Chapter 2 Portability Considerations ......................................................................... 11 2.1. Byte Ordering ....................................................................................... ............................. 11 Byte Swapping and Bit Flipping .......................................................................... 11 2.2. Flipping Pixrects ........................................................................................ ", ..... ,............. 13 The pr_flip () Routine .................................................... :." ... c.,.;:.~;~ ... ;..... ,...... 13 Guidelines for Sun386i Systems ................................... ,; ........ ,... ~ ........ ~ .............. ;. 14 Chapter 3 Pixrect Operations .........................." ............ ,,"., ..;." .. ;; ..................; ............... ,.. ,........ .. 3.1. The pixrectops Structure ..................................... ;., ..; ... ,"', ........... ,............................ 3.2. Calling Pixrect Procedures ......................................................... ,............. _........................ .. Argument Conventions ................... ".................................................. ;...... ;; .................. .. -lll- Contents - Continued Pixrect Errors ............................ ... .............................. ......... ...... .................. ...... .............. 21 3.3. The Op Argument ............................................................................................................ 21 Specifying a RasterOp Function .......................................................................... 22 Specifying a Color ........................................................................................................ 23 Op Arguments between Pixrects of Different Depths ............................. 23 Controlling Clipping in a RasterOp ..... ...... ......... ......... ......... ...... ......... .............. 24 Examples of Complete Op Argument Specification ................................. 24 3.4. Creation and Destruction of Pixrects ................................................................... 24 Create a Primary Display Pixrect ........................................................................ 25 Getting Screen Parameters ...................... ...... ............... ......... ...... ............ ........... 25 Create Secondary Pixrect ......................................................................................... 26 Release Pixrect Resources ................................................................ ....................... 26 3.5. Single-Pixel Operations ............................................................................................... 27 Get Pixel Value .............................................................................................................. 27 Set Pixel Value ............................................................................................................... 27 3.6. Multi-Pixel Operations ................................................................................................. 27 RasterOp Source to Destination ........................................................................... 28 RasterOps through a Mask ...................................................................................... 28 Replicating the Source Pixrect .............................................................................. 29 Multiple Source to the Same Destination ....................................................... 30 Draw Vector ..................................................................................................................... 31 Draw Textured Polygon ............................................................................................ 31 Draw Textured or Solid Lines with Width ..................................................... 34 Draw Textured or Solid Polylines with Width ............................................ 36 Draw Multiple Points ................................................................................................. 37 3.7. Colonnap Access ............................................................................................................. 37 Get Colormap Entries ................................................................................................. 38 Set Colonnap Entries .................................................................................................. 38 Lookup Tables ........................................................ ................................................ ........ 39 True Color Look-Up Table ..................................................................................... 39 XBGR Fonnat ........................................................................................................... 40 Inverted Video Pixrects ............................................................................................. 41 3.8. Attributes for Bitplane Control ................................................................................ 41 - iv- Contents - Continued Get Plane Mask Attributes ....................................................................................... 42 Put Plane Mask Attributes ......................... ... ...... ... ......... ......... ...... ......... ................. 42 3.9. Plane Groups ...................................................................................................................... 42 24-Bit Frame Buffers .................................................................................................. 43 Detennine Supported Plane Groups ........................................................... ........ 45 Get Current Plane Group .......................................................................................... 46 Set Plane Group and Mask .............................................................................. ........ 46 3.10. Double Buffering .......................................................................................................... 46 Get Double-Buffering Attributes ......................................................................... 46 Set Double-Buffering Attributes .......................................................................... 47 3.11. Efficiency Considerations

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    144 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us