open-axiom repository from github
/*1Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.2All rights reserved.3Copyright (C) 2007-2010, Gabriel Dos Reis.4All rights reserved.56Redistribution and use in source and binary forms, with or without7modification, are permitted provided that the following conditions are8met:910- Redistributions of source code must retain the above copyright11notice, this list of conditions and the following disclaimer.1213- Redistributions in binary form must reproduce the above copyright14notice, this list of conditions and the following disclaimer in15the documentation and/or other materials provided with the16distribution.1718- Neither the name of The Numerical Algorithms Group Ltd. nor the19names of its contributors may be used to endorse or promote products20derived from this software without specific prior written permission.2122THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS23IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED24TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A25PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER26OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,27EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,28PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR29PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF30LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING31NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS32SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.33*/3435#define _LIGHTING3D_C36#include "openaxiom-c-macros.h"3738#include <math.h>39#include <string.h>4041#include "light11.bitmap"42#include "light11.mask"434445#include "header.h"46#include "static.h"47#include "draw.h"48#include "cpanel.h"49#include "volume.h"5051#include "Gfun.H1"52#include "XSpadFill.h"53#include "all_3d.H1"5455#define lightMASK ExposureMask56#define lightCursorForeground lightingTitleColor57#define lightCursorBackground foregroundColor5859#define lightFontHeight (lightingFont->max_bounds.ascent+lightingFont->max_bounds.descent)6061#define lightingAxesColor monoColor(52)62#define lightingLabelColor monoColor(12)63#define lightingBoxColor monoColor(138)64#define lightingLightColor monoColor(7)65#define lightingTitleColor monoColor(69)66#define lightingButtonColor monoColor(140)67#define lightingTransColor monoColor(140)68#define lightingTransArrowColor monoColor(100)69#define lightingTransLabelColor monoColor(207)7071#define lightingAxesSize 17572#define lightingAxesX 6173#define lightingAxesY 287475#define lightAxesScale 110 /* the extent of the axes in object space */76#define lightScale 0.63 /* projected scale factor */7778#define arrowHead (control->buttonQueue[lightTranslucent].buttonX + 5)79static viewTriple point0 = {0,0,0};808182/***************************83* int makeLightingPanel() *84***************************/8586int87makeLightingPanel(void)88{8990int i;91XSetWindowAttributes cwAttrib, controlAttrib;92XSizeHints sizehint;93Pixmap lightbits,lightmask;94XColor foreColor, backColor;9596lightbits = XCreateBitmapFromData(dsply,rtWindow,97(const char*) lightBitmap_bits,98lightBitmap_width,lightBitmap_height);99lightmask = XCreateBitmapFromData(dsply,rtWindow,100(const char*) lightMask_bits,101lightMask_width,lightMask_height);102cwAttrib.background_pixel = backgroundColor;103cwAttrib.border_pixel = foregroundColor;104cwAttrib.event_mask = lightMASK;105cwAttrib.colormap = colorMap;106cwAttrib.override_redirect = overrideManager;107foreColor.pixel = lightCursorForeground;108XQueryColor(dsply,colorMap,&foreColor);109backColor.pixel = lightCursorBackground;110XQueryColor(dsply,colorMap,&backColor);111cwAttrib.cursor = XCreatePixmapCursor(dsply,lightbits,lightmask,112&foreColor,&backColor,113lightBitmap_x_hot,lightBitmap_y_hot);114lightingWindow = XCreateWindow(dsply,control->controlWindow,115-3,-3,controlWidth,controlHeight,3,116CopyFromParent,InputOutput,CopyFromParent,117controlCreateMASK,&cwAttrib);118119sizehint.flags = USPosition | USSize;120sizehint.x = 0;121sizehint.y = 0;122sizehint.width = controlWidth;123sizehint.height = controlHeight;124/*** the None stands for icon pixmap. ***/125XSetNormalHints(dsply,lightingWindow,&sizehint);126XSetStandardProperties(dsply,lightingWindow,"Lighting Panel 3D",127"Lighting Panel",None,NULL,0,&sizehint);128129/*** lighting axes window ***/130cwAttrib.event_mask = 0;131lightingAxes = XCreateWindow(dsply,lightingWindow,132lightingAxesX,lightingAxesY,133lightingAxesSize,lightingAxesSize,1340,CopyFromParent,InputOutput,CopyFromParent,135controlCreateMASK,&cwAttrib);136137sizehint.flags = USPosition | USSize;138sizehint.x = lightingAxesX;139sizehint.y = lightingAxesY;140sizehint.width = lightingAxesSize;141sizehint.height = lightingAxesSize;142/*** the None stands for icon pixmap ***/143XSetNormalHints(dsply,lightingAxes,&sizehint);144XSetStandardProperties(dsply,lightingAxes,"Lighting Axes","Lighting Axes",145None,NULL,0,&sizehint);146XMapWindow(dsply,lightingAxes);147148/*** draw lighting buttons ***/149initLightButtons(control->buttonQueue);150/*151controlAttrib.event_mask = (control->buttonQueue[lightingButtonsStart]).mask;152(control->buttonQueue[lightingButtonsStart]).self =153XCreateWindow(dsply, lightingWindow,154(control->buttonQueue[lightingButtonsStart]).buttonX,155(control->buttonQueue[lightingButtonsStart]).buttonY,156(control->buttonQueue[lightingButtonsStart]).buttonWidth,157(control->buttonQueue[lightingButtonsStart]).buttonHeight,1580,0,InputOnly,CopyFromParent,159buttonCreateMASK,&controlAttrib);160XMakeAssoc(dsply,table,(control->buttonQueue[lightingButtonsStart]).self,161&((control->buttonQueue[lightingButtonsStart]).buttonKey));162XMapWindow(dsply,(control->buttonQueue[lightingButtonsStart]).self);163*/164for (i=(lightingButtonsStart + 1); i<(lightingButtonsEnd); i++) {165controlAttrib.event_mask = (control->buttonQueue[i]).mask;166(control->buttonQueue[i]).self =167XCreateWindow(dsply,lightingWindow,168(control->buttonQueue[i]).buttonX,169(control->buttonQueue[i]).buttonY,170(control->buttonQueue[i]).buttonWidth,171(control->buttonQueue[i]).buttonHeight,1720,0,InputOnly,CopyFromParent,173buttonCreateMASK,&controlAttrib);174XMakeAssoc(dsply,table,(control->buttonQueue[i]).self,175&((control->buttonQueue[i]).buttonKey));176XMapWindow(dsply,(control->buttonQueue[i]).self);177}178179/* assign global direction variables for light projections */180sinTheta = sin(-viewport->theta);181cosTheta = cos(-viewport->theta);182sinPhi = sin(viewport->phi);183cosPhi = cos(viewport->phi);184185return(0);186187} /* makeLightingPanel() */188189/***************************190* void drawLightingAxes() *191***************************/192193void194drawLightingAxes(void)195{196197XWindowAttributes laInfo;198int i,xCenter,yCenter;199float Px0,Py0;200int vPx0,vPy0,vPx1,vPy1;201viewTriple pointX,pointY,pointXY,pointXYZ;202203XGetWindowAttributes(dsply,lightingAxes,&laInfo);204XClearWindow(dsply,lightingAxes);205xCenter = laInfo.width / 2;206yCenter = laInfo.height / 2;207208sinTheta = sin(-viewport->theta);209cosTheta = cos(-viewport->theta);210sinPhi = sin(viewport->phi);211cosPhi = cos(viewport->phi);212213GSetForeground(lightingGC,(float)monoColor(buttonColor),Xoption);214for (i=0; i < 3; i++) {215Px0 = proj2PX(axes[i][0],axes[i][1]);216Py0 = proj2PY(axes[i][0],axes[i][1],axes[i][2]);217vPx0 = Px0 * lightScale + xCenter;218vPy0 = laInfo.height - (Py0 * lightScale + yCenter);219Px0 = proj2PX(axes[i][3],axes[i][4]);220Py0 = proj2PY(axes[i][3],axes[i][4],axes[i][5]);221vPx1 = Px0 * lightScale + xCenter;222vPy1 = laInfo.height - (Py0 * lightScale + yCenter);223GDrawLine(lightingGC,lightingAxes,vPx0,vPy0,vPx1,vPy1,Xoption);224}225226GSetForeground(lightingGC,(float)lightingLabelColor,Xoption);227for (i=0; i < basicScreen; i++) {228Px0 = proj2PX(labels[i][0],labels[i][1]);229Py0 = proj2PY(labels[i][0],labels[i][1],labels[i][2]);230vPx0 = Px0 * lightScale + xCenter;231vPy0 = laInfo.height - (Py0 * lightScale + yCenter);232Px0 = proj2PX(labels[i][3],labels[i][4]);233Py0 = proj2PY(labels[i][3],labels[i][4],labels[i][5]);234vPx1 = Px0 * lightScale + xCenter;235vPy1 = laInfo.height - (Py0 * lightScale + yCenter);236GDrawLine(lightingGC,lightingAxes,vPx0,vPy0,vPx1,vPy1,Xoption);237}238239GSetForeground(lightingGC,(float)lightingBoxColor,Xoption);240pointX.x = tempLightPointer[0] * lightAxesScale;241pointX.y = 0;242pointX.z = 0;243244pointY.x = 0;245pointY.y = tempLightPointer[1] * lightAxesScale;246pointY.z = 0;247248pointXY.x = tempLightPointer[0] * lightAxesScale;249pointXY.y = tempLightPointer[1] * lightAxesScale;250pointXY.z = 0;251252pointXYZ.x = tempLightPointer[0] * lightAxesScale;253pointXYZ.y = tempLightPointer[1] * lightAxesScale;254pointXYZ.z = tempLightPointer[2] * lightAxesScale;255256Px0 = proj2PX(pointXY.x,pointXY.y);257Py0 = proj2PY(pointXY.x,pointXY.y,pointXY.z);258vPx0 = Px0 * lightScale + xCenter;259vPy0 = laInfo.height - (Py0 * lightScale + yCenter);260261Px0 = proj2PX(pointX.x,pointX.y);262Py0 = proj2PY(pointX.x,pointX.y,pointX.z);263vPx1 = Px0 * lightScale + xCenter;264vPy1 = laInfo.height - (Py0 * lightScale + yCenter);265GDrawLine(lightingGC,lightingAxes,vPx0,vPy0,vPx1,vPy1,Xoption);266267Px0 = proj2PX(pointY.x,pointY.y);268Py0 = proj2PY(pointY.x,pointY.y,pointY.z);269vPx1 = Px0 * lightScale + xCenter;270vPy1 = laInfo.height - (Py0 * lightScale + yCenter);271GDrawLine(lightingGC,lightingAxes,vPx0,vPy0,vPx1,vPy1,Xoption);272273Px0 = proj2PX(pointXYZ.x,pointXYZ.y);274Py0 = proj2PY(pointXYZ.x,pointXYZ.y,pointXYZ.z);275vPx1 = Px0 * lightScale + xCenter;276vPy1 = laInfo.height - (Py0 * lightScale + yCenter);277GDrawLine(lightingGC,lightingAxes,vPx0,vPy0,vPx1,vPy1,Xoption);278279GSetForeground(lightingGC,(float)lightingLightColor,Xoption);280Px0 = proj2PX(point0.x,point0.y);281Py0 = proj2PY(point0.x,point0.y,point0.z);282vPx0 = Px0 * lightScale + xCenter;283vPy0 = laInfo.height - (Py0 * lightScale + yCenter);284GDrawLine(lightingGC,lightingAxes,vPx0,vPy0,vPx1,vPy1,Xoption);285286} /* drawLightingAxes */287288289/******************************290* void drawLightTransArrow() *291******************************/292293void294drawLightTransArrow(void)295{296297int i;298float f;299300/*** Draw the intensity potentiometer window. ***/301XClearArea(dsply,lightingWindow,302(control->buttonQueue[lightTranslucent]).buttonX,303(control->buttonQueue[lightTranslucent]).buttonY-5,304(control->buttonQueue[lightTranslucent]).buttonWidth,305(control->buttonQueue[lightTranslucent]).buttonHeight+10,306False);307GDrawLine(controlMessageGC,lightingWindow,308(control->buttonQueue[lightTranslucent]).buttonX,309(control->buttonQueue[lightTranslucent]).buttonY,310(control->buttonQueue[lightTranslucent]).buttonX,311(control->buttonQueue[lightTranslucent]).buttonY +312(control->buttonQueue[lightTranslucent]).buttonHeight,Xoption);313GDrawLine(controlMessageGC,lightingWindow,314(control->buttonQueue[lightTranslucent]).buttonX + 1,315(control->buttonQueue[lightTranslucent]).buttonY,316(control->buttonQueue[lightTranslucent]).buttonX +317(control->buttonQueue[lightTranslucent]).buttonWidth * 3/10,318(control->buttonQueue[lightTranslucent]).buttonY,Xoption);319GDrawLine(controlMessageGC,lightingWindow,320(control->buttonQueue[lightTranslucent]).buttonX + 1,321(control->buttonQueue[lightTranslucent]).buttonY +322(control->buttonQueue[lightTranslucent]).yHalf/2,323(control->buttonQueue[lightTranslucent]).buttonX +324(control->buttonQueue[lightTranslucent]).buttonWidth * 2/10,325(control->buttonQueue[lightTranslucent]).buttonY +326(control->buttonQueue[lightTranslucent]).yHalf/2,Xoption);327GDrawLine(controlMessageGC,lightingWindow,328(control->buttonQueue[lightTranslucent]).buttonX + 1,329(control->buttonQueue[lightTranslucent]).buttonY +330(control->buttonQueue[lightTranslucent]).yHalf,331(control->buttonQueue[lightTranslucent]).buttonX +332(control->buttonQueue[lightTranslucent]).buttonWidth * 3/10,333(control->buttonQueue[lightTranslucent]).buttonY +334(control->buttonQueue[lightTranslucent]).yHalf,Xoption);335GDrawLine(controlMessageGC,lightingWindow,336(control->buttonQueue[lightTranslucent]).buttonX + 1,337(control->buttonQueue[lightTranslucent]).buttonY +338(control->buttonQueue[lightTranslucent]).buttonHeight*3/4,339(control->buttonQueue[lightTranslucent]).buttonX +340(control->buttonQueue[lightTranslucent]).buttonWidth * 2/10,341(control->buttonQueue[lightTranslucent]).buttonY +342(control->buttonQueue[lightTranslucent]).buttonHeight*3/4,Xoption);343GDrawLine(controlMessageGC,lightingWindow,344(control->buttonQueue[lightTranslucent]).buttonX + 1,345(control->buttonQueue[lightTranslucent]).buttonY +346(control->buttonQueue[lightTranslucent]).buttonHeight,347(control->buttonQueue[lightTranslucent]).buttonX +348(control->buttonQueue[lightTranslucent]).buttonWidth * 3/10,349(control->buttonQueue[lightTranslucent]).buttonY +350(control->buttonQueue[lightTranslucent]).buttonHeight,Xoption);351352/*** Draw the intensity selection arrow ***/353GSetForeground(lightingGC,(float)lightingTransArrowColor,Xoption);354355f = (control->buttonQueue[lightTranslucent].buttonY +356control->buttonQueue[lightTranslucent].buttonHeight) -357(tempLightIntensity *358control->buttonQueue[lightTranslucent].buttonHeight);359i = f;360GDrawLine(lightingGC, lightingWindow, arrowHead + 10, i,361arrowHead + 22, i + 2, Xoption);362GDrawLine(lightingGC, lightingWindow, arrowHead + 22, i + 2,363arrowHead + 22, i - 2, Xoption);364GDrawLine(lightingGC, lightingWindow, arrowHead + 22, i - 2,365arrowHead + 10, i, Xoption);366367} /* drawLightTransArrow() */368369370371372373/****************************374* void drawLightingPanel() *375****************************/376377void378drawLightingPanel(void)379{380381const char* s;382int i,strlength;383384/* Draw border lines to separate the lighting window, potentiometers,385and button regions of the lightng subpanel. */386GSetForeground(trashGC,(float)foregroundColor,Xoption);387GSetLineAttributes(trashGC,3,LineSolid,CapButt,JoinMiter,Xoption);388GDrawLine(trashGC, lightingWindow, 0, potA, controlWidth, potA, Xoption);389390GSetLineAttributes(trashGC,2,LineSolid,CapButt,JoinMiter,Xoption);391GDrawLine(trashGC, lightingWindow, 0, lightB, controlWidth, lightB, Xoption);392GDrawLine(trashGC, lightingWindow, 0, lightPotA, controlWidth,393lightPotA, Xoption);394GDrawLine(trashGC, lightingWindow, 0, lightPotB, controlWidth,395lightPotB, Xoption);396GDrawLine(trashGC, lightingWindow, lightTransL, lightPotA,397lightTransL, lightPotB, Xoption);398399writeControlTitle(lightingWindow);400s = "Lighting Control Panel";401strlength = strlen(s);402GSetForeground(anotherGC,(float)lightingTitleColor,Xoption);403GDrawString(anotherGC, lightingWindow,404centerX(anotherGC, s, strlength, controlWidth),405lightB+18, s, strlength, Xoption);406407for (i=lightingButtonsStart; i<(lightingButtonsEnd); i++) {408switch (i) {409case lightMove:410GSetForeground(lightingGC,(float)lightingButtonColor,Xoption);411GDraw3DButtonOut(lightingGC,lightingWindow,412(control->buttonQueue[i]).buttonX,413(control->buttonQueue[i]).buttonY,414(control->buttonQueue[i]).buttonWidth,415(control->buttonQueue[i]).buttonHeight,Xoption);416GSetForeground(lightingGC,(float)monoColor(buttonColor),Xoption);417GDrawLine(lightingGC,lightingWindow,418(control->buttonQueue[i]).buttonX +419(control->buttonQueue[i]).xHalf,420(control->buttonQueue[i]).buttonY,421(control->buttonQueue[i]).buttonX +422(control->buttonQueue[i]).xHalf,423(control->buttonQueue[i]).buttonY +4242*(control->buttonQueue[i]).yHalf,Xoption);425GDrawLine(lightingGC,lightingWindow,426(control->buttonQueue[i]).buttonX,427(control->buttonQueue[i]).buttonY +428(control->buttonQueue[i]).yHalf,429(control->buttonQueue[i]).buttonX +4302*(control->buttonQueue[i]).xHalf,431(control->buttonQueue[i]).buttonY +432(control->buttonQueue[i]).yHalf,Xoption);433break;434case lightMoveXY:435GSetForeground(lightingGC,(float)lightingButtonColor,Xoption);436GDraw3DButtonOut(lightingGC,lightingWindow,437(control->buttonQueue[i]).buttonX,438(control->buttonQueue[i]).buttonY,439(control->buttonQueue[i]).buttonWidth,440(control->buttonQueue[i]).buttonHeight,Xoption);441GSetForeground(lightingGC,(float)monoColor(buttonColor),Xoption);442GDrawLine(lightingGC,lightingWindow,443(control->buttonQueue[i]).buttonX +444(control->buttonQueue[i]).xHalf,445(control->buttonQueue[i]).buttonY,446(control->buttonQueue[i]).buttonX +447(control->buttonQueue[i]).xHalf,448(control->buttonQueue[i]).buttonY +4492*(control->buttonQueue[i]).yHalf,Xoption);450GDrawLine(lightingGC,lightingWindow,451(control->buttonQueue[i]).buttonX,452(control->buttonQueue[i]).buttonY +453(control->buttonQueue[i]).yHalf,454(control->buttonQueue[i]).buttonX +4552*(control->buttonQueue[i]).xHalf,456(control->buttonQueue[i]).buttonY +457(control->buttonQueue[i]).yHalf,Xoption);458break;459case lightMoveZ:460GSetForeground(lightingGC,(float)lightingButtonColor,Xoption);461GDraw3DButtonOut(lightingGC,lightingWindow,462(control->buttonQueue[i]).buttonX,463(control->buttonQueue[i]).buttonY,464(control->buttonQueue[i]).buttonWidth,465(control->buttonQueue[i]).buttonHeight,Xoption);466GSetForeground(lightingGC,(float)monoColor(buttonColor),Xoption);467GDrawLine(lightingGC,lightingWindow,468(control->buttonQueue[i]).buttonX +469(control->buttonQueue[i]).xHalf,470(control->buttonQueue[i]).buttonY,471(control->buttonQueue[i]).buttonX +472(control->buttonQueue[i]).xHalf,473(control->buttonQueue[i]).buttonY +4742*(control->buttonQueue[i]).yHalf,Xoption);475GDrawLine(lightingGC,lightingWindow,476(control->buttonQueue[i]).buttonX +477(control->buttonQueue[i]).xHalf -478(control->buttonQueue[i]).xHalf/2,479(control->buttonQueue[i]).buttonY +480(control->buttonQueue[i]).yHalf,481(control->buttonQueue[i]).buttonX +482(control->buttonQueue[i]).xHalf +483(control->buttonQueue[i]).xHalf/2,484(control->buttonQueue[i]).buttonY +485(control->buttonQueue[i]).yHalf,Xoption);486break;487case lightTranslucent:488drawLightTransArrow();489break;490default:491GDraw3DButtonOut(lightingGC,lightingWindow,492(control->buttonQueue[i]).buttonX,493(control->buttonQueue[i]).buttonY,494(control->buttonQueue[i]).buttonWidth,495(control->buttonQueue[i]).buttonHeight,Xoption);496s = (control->buttonQueue[i]).text;497strlength = strlen(s);498GSetForeground(trashGC,499(float)monoColor((control->buttonQueue[i]).textColor),Xoption);500GDrawString(trashGC, lightingWindow,501(control->buttonQueue[i]).buttonX +502centerX(processGC,s,strlength,503(control->buttonQueue[i]).buttonWidth),504(control->buttonQueue[i]).buttonY +505centerY(processGC,(control->buttonQueue[i]).buttonHeight),506s,strlen(s),Xoption);507} /* switch */508} /* for i in control->buttonQueue */509510GSetForeground(lightingGC,(float)monoColor(labelColor),Xoption);511GDrawString(lightingGC,lightingWindow,512control->buttonQueue[lightMoveXY].buttonX +513control->buttonQueue[lightMoveXY].buttonWidth + 3,514control->buttonQueue[lightMoveXY].buttonY +515control->buttonQueue[lightMoveXY].yHalf,516"x",1,Xoption);517GDrawString(lightingGC,lightingWindow,518control->buttonQueue[lightMoveXY].buttonX +519control->buttonQueue[lightMoveXY].xHalf - 2,520control->buttonQueue[lightMoveXY].buttonY - 4,521"y",1,Xoption);522GDrawString(lightingGC,lightingWindow,523control->buttonQueue[lightMoveZ].buttonX +524control->buttonQueue[lightMoveZ].xHalf - 2,525control->buttonQueue[lightMoveZ].buttonY - 4,526"z",1,Xoption);527528/** Draw the title for the intensity potentiometer. */529GSetForeground(lightingGC,(float)lightingTransColor,Xoption);530531GDrawString(lightingGC,lightingWindow,532control->buttonQueue[lightTranslucent].buttonX +533control->buttonQueue[lightTranslucent].buttonWidth + 3,534control->buttonQueue[lightTranslucent].buttonY,535"I",1,Xoption);536GDrawString(lightingGC,lightingWindow,537control->buttonQueue[lightTranslucent].buttonX +538control->buttonQueue[lightTranslucent].buttonWidth + 3,539control->buttonQueue[lightTranslucent].buttonY +540lightFontHeight,541"n",1,Xoption);542GDrawString(lightingGC,lightingWindow,543control->buttonQueue[lightTranslucent].buttonX +544control->buttonQueue[lightTranslucent].buttonWidth + 3,545control->buttonQueue[lightTranslucent].buttonY +546lightFontHeight*2,547"t",1,Xoption);548GDrawString(lightingGC,lightingWindow,549control->buttonQueue[lightTranslucent].buttonX +550control->buttonQueue[lightTranslucent].buttonWidth + 3,551control->buttonQueue[lightTranslucent].buttonY +552lightFontHeight*3,553"e",1,Xoption);554GDrawString(lightingGC,lightingWindow,555control->buttonQueue[lightTranslucent].buttonX +556control->buttonQueue[lightTranslucent].buttonWidth + 3,557control->buttonQueue[lightTranslucent].buttonY +558lightFontHeight*4,559"n",1,Xoption);560GDrawString(lightingGC,lightingWindow,561control->buttonQueue[lightTranslucent].buttonX +562control->buttonQueue[lightTranslucent].buttonWidth + 3,563control->buttonQueue[lightTranslucent].buttonY +564lightFontHeight*5,565"s",1,Xoption);566GDrawString(lightingGC,lightingWindow,567control->buttonQueue[lightTranslucent].buttonX +568control->buttonQueue[lightTranslucent].buttonWidth + 3,569control->buttonQueue[lightTranslucent].buttonY +570lightFontHeight*6,571"i",1,Xoption);572GDrawString(lightingGC,lightingWindow,573control->buttonQueue[lightTranslucent].buttonX +574control->buttonQueue[lightTranslucent].buttonWidth + 3,575control->buttonQueue[lightTranslucent].buttonY +576lightFontHeight*7,577"t",1,Xoption);578GDrawString(lightingGC,lightingWindow,579control->buttonQueue[lightTranslucent].buttonX +580control->buttonQueue[lightTranslucent].buttonWidth + 3,581control->buttonQueue[lightTranslucent].buttonY +582lightFontHeight*8,583"y",1,Xoption);584drawLightingAxes();585drawLightTransArrow();586587} /* drawLightingPanel */588589590591592593594595