logo资料库

VAPS使用手册1.pdf

第1页 / 共279页
第2页 / 共279页
第3页 / 共279页
第4页 / 共279页
第5页 / 共279页
第6页 / 共279页
第7页 / 共279页
第8页 / 共279页
资料共279页,剩余部分请下载后查看
CODE nGEN Programmer’s Guide
Copyright
Contents
1: In This Guide
About this Document
Who Should Read this Document
In this Document
Related Documents
Conventions Used
Notes, Tips and Warnings
2: Understanding the Runtime Architecture
Viewing the Runtime Architecture
Standard Architecture
Graphics Server Architecture (ARINC 661)
RT Kernel
Porting Layer
Understanding the Managers
Understanding the Drawing Manager
Understanding the Fonts
Understanding the Font Table
Understanding Events
Understanding the RT (System) Event Manager
Understanding the State Machine
Viewing the Runtime Architecture Components
Viewing the nGEN Sources for Generic XT
Viewing the nGEN Sources for ARINC 661Support
3: Using CODE nGEN
About CODE nGEN
Understanding the Configuration Files
Locating the Build Configuration File
Customizing the Build Configuration File
Using the Class and Implementation Files
Compiling Applications and nGEN Sources using cg_make
Compiling nGEN Sources with Visual Studio
Building a Stand-Alone Windows Executable
Building a Stand-Alone Executable for a Target Platform
4: Using Main and Integration Modules
Developing a Main Module
Main Function
Building Integrations
API
C++ Callback Interface
C VAPS XT User Integration Interface
C Callback Interface
Call Flow
Linking Libraries
ARINC 661 Integration Module
5: Porting to a Target Platform
Understanding Rehosting
Rehosting with the nGEN Sources
Building the Runtime Libraries for a Target Platform
Compiling the Runtime Libraries for a Target Platform
Porting an Application to a Target Platform
STEP 1: Planning
STEP 2: Preparing the Port
STEP 3: Modifying the CODE nGEN Build Configuration File
STEP 4: Developing Your Port
STEP 4.1: Defining the Basics
STEP 4.2: Configuring VAPS XT Features
STEP 4.3: Developing the Input Drivers
STEP 4.4: Porting the Utilities
STEP 4.5: Porting the Fonts
STEP 4.6: Porting the Third Party Libraries
STEP 4.7: Porting the Coded Objects
Resolving Errors
STEP 5: Testing Your Port
STEP 6: Testing Your Graphics Server
6: Other Porting Issues
The Application Configuration File
Run Time Error Manager
Error Stack
Error Handler
Error severity
Disable text output
Define new error
Error Handler Interface
Error Manager API
Porting Memory Instrumentation
7: The Graphics Server
Overview of the Graphics Server Architecture
Main & Integration Modules
Widget Library
VAPS XT A661 Runtime Kernel
VAPS XT Runtime Kernel
VAPS XT Porting Layer
Implementing a User Application
Receiving messages from the CDS
vHandleWidgetEvent
Sending messages to the CDS
Calculating the Size of a Command Block
Changing the Current Output Stream
UA Request Commands
Set Parameter Commands
Buffer Format Functions
Miscellaneous Functions
Connecting a User Application to the Graphics Server
Handling Runtime Commands
The A661 Manager
The Remote UA
Implementing UDP Streams
Sample User Application Code
Sample Graphics Server Code
Graphics Server C Interface
Miscellaneous
8: The Porting Layer
Overview of the Porting Layer
Where the Porting Layer Fits in
Display Porting Layer
OS Porting Layer
Using Porting Layer Strings and Streams
Using vxtPLString and vxtPLWString to convert values to string
Using vxtPLTxtOStream to write to a buffer, the standard output or a text file
Implementing a Porting Layer Task Helper
Registration with the User Integration Interface
Working with the Task
Creating the Porting Layer Task Helper
Implementing a Porting Layer Device Manager
Finding Windows and Devices
Device Management
Implementing a Porting Layer Device
Device Operations
Window Management
Implementing a Porting Layer Window
Window Operations
Drawing Operations
Implementing a Graphic Layer
Primitives
Attributes
Linestyles
Patterns
Opacity
Gradient
Attribute Tables
Image, Raster Font, and Picture
Monochrome Tiles
General Attributes
Transformations
Advanced Stencil API
Miscellaneous
A: Communicating Externally
Example: Create a GUI to Display Hardware Status
VERSION 3.0 CODE nGEN PROGRAMMER’S GUIDE
Copyright VAPS XT 3.0 CODE nGEN Programmer’s Guide © 2009 Presagis™ All rights reserved. All trademarks contained herein are the property of their respective owners. PRESAGIS PROVIDES THIS MATERIAL AS IS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Presagis may make improvements and changes to the product described in this document at any time without notice. Presagis assumes no responsibility for the use of the product or this document except as expressly set forth in the applicable Presagis agreement or agreements and subject to terms and conditions set forth therein and applicable Presagis policies and procedures. This document may contain technical inaccuracies or typographical errors. Periodic changes may be made to the information contained herein. If necessary, these changes will be incorporated in new editions of the document. Presagis Canada Inc. and/or Presagis USA Inc. and/or its suppliers are the owners of all intellectual property rights in and to this document and any proprietary software that accompanies this documentation, including but not limited to, copyrights in and to this document and any derivative works there from. Use of this document is subject to the terms and conditions of the Presagis Software License Agreement included with this product. No part of this publication may be stored in a data retrieval system, transmitted, distributed or reproduced, in whole or in part, in any way, including, but not limited to, photocopy, photograph, magnetic, or other record, without the prior written permission of Presagis Canada Inc. and/or Presagis USA Inc. Use, distribution, duplication, or disclosure by the U. S. Government is subject to "Restricted Rights" as set forth in DFARS 252.227-7014(c)(1)(ii). April 29, 2009
Contents Chapter 1: In This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 About this Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Who Should Read this Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 In this Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10 Related Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 Conventions Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 Notes, Tips and Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13 Chapter 2: Understanding the Runtime Architecture . . . . . . . . . . . 14 Viewing the Runtime Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 Standard Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 Graphics Server Architecture (ARINC 661) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18 RT Kernel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 Porting Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 Understanding the Managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 Understanding the Drawing Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 Understanding the Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 Understanding the Font Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24 Raster Font Drawing Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 Understanding Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32 The OMEvent Manager (vxtRTOMEventManager) . . . . . . . . . . . . . . . . . . .33 Understanding the RT (System) Event Manager. . . . . . . . . . . . . . . . . . . . . . . . .34 Understanding the State Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 Viewing the Runtime Architecture Components . . . . . . . . . . . . . . . . . . . . . . . . . . .38 Viewing the nGEN Sources for Generic XT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41 Viewing the nGEN Sources for ARINC 661Support . . . . . . . . . . . . . . . . . . . . . .46 Chapter 3: Using CODE nGEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 VAPS XT CODE nGEN Programmer’s Guide \ 3
Contents About CODE nGEN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48 Understanding the Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 Locating the Build Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 Customizing the Build Configuration File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 Using the Class and Implementation Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50 Generated Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53 Compiling Applications and nGEN Sources using cg_make . . . . . . . . . . . . .54 Compiling nGEN Sources with Visual Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 Building a Stand-Alone Windows Executable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 Building a Stand-Alone Executable for a Target Platform . . . . . . . . . . . . . . . . . . .60 Chapter 4: Using Main and Integration Modules. . . . . . . . . . . . . . . . 61 Developing a Main Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62 Main Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62 Building Integrations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63 API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63 C++ Callback Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 C VAPS XT User Integration Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 Draw Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70 Input Event Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 C Callback Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 Call Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .73 Linking Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75 ARINC 661 Integration Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 Chapter 5: Porting to a Target Platform . . . . . . . . . . . . . . . . . . . . . . . . 78 Understanding Rehosting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79 Rehosting with the nGEN Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80 Building the Runtime Libraries for a Target Platform . . . . . . . . . . . . . . . . . . . .81 Compiling the Runtime Libraries for a Target Platform. . . . . . . . . . . . . . . . . .82 Using the makefile and the cg_make command . . . . . . . . . . . . . . . . . . . .83 Porting an Application to a Target Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85 STEP 1: Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .86 STEP 2: Preparing the Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 STEP 3: Modifying the CODE nGEN Build Configuration File . . . . . . . . . . . . .89 VAPS XT CODE nGEN Programmer’s Guide \ 4
Contents STEP 4: Developing Your Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 STEP 4.1: Defining the Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 STEP 4.2: Configuring VAPS XT Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Conditional Compilation Settings Certifiable in Future VAPS XT-178 Product. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 STEP 4.3: Developing the Input Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 STEP 4.4: Porting the Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 STEP 4.5: Porting the Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 STEP 4.6: Porting the Third Party Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 STEP 4.7: Porting the Coded Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Resolving Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 STEP 5: Testing Your Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 STEP 6: Testing Your Graphics Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Chapter 6: Other Porting Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136 The Application Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Run Time Error Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Error Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Error Handler. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Error severity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Disable text output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Define new error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Error Handler Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Error Manager API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 Porting Memory Instrumentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Chapter 7: The Graphics Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147 Overview of the Graphics Server Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Main & Integration Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Widget Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 VAPS XT A661 Runtime Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 VAPS XT Runtime Kernel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 VAPS XT Porting Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Implementing a User Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Receiving messages from the CDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 vHandleWidgetEvent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Sending messages to the CDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 VAPS XT CODE nGEN Programmer’s Guide \ 5
Contents Calculating the Size of a Command Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Changing the Current Output Stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 UA Request Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Set Parameter Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 vSetPosX3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 vSetPosXY3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 vSetSizeY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 vSetParamByte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 vSetParamUShort. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 vSetParamUInt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 vSetParamString. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Buffer Format Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 vSetParamBuffer2UInt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Miscellaneous Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Connecting a User Application to the Graphics Server. . . . . . . . . . . . . . . . . . . . 185 Handling Runtime Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 The A661 Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 The Remote UA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Implementing UDP Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Sample User Application Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Sample Graphics Server Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Graphics Server C Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 Chapter 8: The Porting Layer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193 Overview of the Porting Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Where the Porting Layer Fits in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Display Porting Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 OS Porting Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 Using Porting Layer Strings and Streams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Using vxtPLString and vxtPLWString to convert values to string. . . . . . . 209 Using vxtPLTxtOStream to write to a buffer, the standard output or a text file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 Implementing a Porting Layer Task Helper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 Registration with the User Integration Interface . . . . . . . . . . . . . . . . . . . . . . 214 rGetUserIntegration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 Working with the Task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 VAPS XT CODE nGEN Programmer’s Guide \ 6
Contents vMainLoop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 Creating the Porting Layer Task Helper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 Implementing a Porting Layer Device Manager . . . . . . . . . . . . . . . . . . . . . . . . . . 217 Finding Windows and Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 pGetWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 Device Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 Implementing a Porting Layer Device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 Device Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 Window Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 Implementing a Porting Layer Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 Window Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 Drawing Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 Implementing a Graphic Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 vDrawShape. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 Linestyles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 Patterns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 Opacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 Gradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 Attribute Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 vSetPatternTable() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 Image, Raster Font, and Picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 Monochrome Tiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 vDrawPixels() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 General Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 vApplyPenAttributes (). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 vInvalidateInvariant (). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 Transformations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 NeedToUpdateScaleFactor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 vSetUnit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 Advanced Stencil API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 Miscellaneous. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 Appendix A: Communicating Externally . . . . . . . . . . . . . . . . . . . . . .276 Example: Create a GUI to Display Hardware Status . . . . . . . . . . . . . . . . . . . . . . . 277 Notify when Data Changes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 VAPS XT CODE nGEN Programmer’s Guide \ 7
1 In This Guide This chapter contains the following sections: In this Document • About this Document • • Related Documents • Conventions Used • Notes, Tips and Warnings VAPS XT CODE nGEN Programmer’s Guide \ 8
分享到:
收藏