12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <title>PUMA: /Users/home/WC/puma/src/pumax.c Source File</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- <link href="navtree.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="resize.js"></script>
- <script type="text/javascript" src="navtree.js"></script>
- <script type="text/javascript">
- $(document).ready(initResizable);
- </script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/search.js"></script>
- <script type="text/javascript">
- $(document).ready(function() { searchBox.OnSelectItem(0); });
- </script>
- </head>
- <body>
- <div id="top"><!-- do not remove this div! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
-
- <td id="projectlogo"><img alt="Logo" src="puma103.jpg"/></td>
-
-
- <td style="padding-left: 0.5em;">
- <div id="projectname">PUMA
-  <span id="projectnumber">219</span>
- </div>
- <div id="projectbrief">Portable University Model of the Atmosphere</div>
- </td>
-
-
-
- </tr>
- </tbody>
- </table>
- </div>
- <!-- Generated by Doxygen 1.7.5.1 -->
- <script type="text/javascript">
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- </script>
- <div id="navrow1" class="tabs">
- <ul class="tablist">
- <li><a href="index.html"><span>Main Page</span></a></li>
- <li><a href="annotated.html"><span>Data Types List</span></a></li>
- <li class="current"><a href="files.html"><span>Files</span></a></li>
- <li>
- <div id="MSearchBox" class="MSearchBoxInactive">
- <span class="left">
- <img id="MSearchSelect" src="search/mag_sel.png"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- alt=""/>
- <input type="text" id="MSearchField" value="Search" accesskey="S"
- onfocus="searchBox.OnSearchFieldFocus(true)"
- onblur="searchBox.OnSearchFieldFocus(false)"
- onkeyup="searchBox.OnSearchFieldChange(event)"/>
- </span><span class="right">
- <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
- </span>
- </div>
- </li>
- </ul>
- </div>
- <div id="navrow2" class="tabs2">
- <ul class="tablist">
- <li><a href="files.html"><span>File List</span></a></li>
- <li><a href="globals.html"><span>File Members</span></a></li>
- </ul>
- </div>
- </div>
- <div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
- </div>
- <script type="text/javascript">
- initNavTree('pumax_8c.html','');
- </script>
- <div id="doc-content">
- <div class="header">
- <div class="headertitle">
- <div class="title">/Users/home/WC/puma/src/pumax.c</div> </div>
- </div>
- <div class="contents">
- <a href="pumax_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
- <a name="l00002"></a>00002 <span class="comment"> pumax - a GUI for PUMA & PLASIM</span>
- <a name="l00003"></a>00003 <span class="comment"> (c) 2007 Edilbert Kirk (E.Kirk@gmx.de)</span>
- <a name="l00004"></a>00004 <span class="comment"></span>
- <a name="l00005"></a>00005 <span class="comment"> This program is free software; you can redistribute it and/or modify</span>
- <a name="l00006"></a>00006 <span class="comment"> it under the terms of the GNU General Public License as published by</span>
- <a name="l00007"></a>00007 <span class="comment"> the Free Software Foundation; either version 2 of the License, or</span>
- <a name="l00008"></a>00008 <span class="comment"> (at your option) any later version.</span>
- <a name="l00009"></a>00009 <span class="comment"></span>
- <a name="l00010"></a>00010 <span class="comment"> This program is distributed in the hope that it will be useful,</span>
- <a name="l00011"></a>00011 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
- <a name="l00012"></a>00012 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
- <a name="l00013"></a>00013 <span class="comment"> GNU General Public License for more details.</span>
- <a name="l00014"></a>00014 <span class="comment"></span>
- <a name="l00015"></a>00015 <span class="comment"> You should have received a copy of the GNU General Public License</span>
- <a name="l00016"></a>00016 <span class="comment"> along with this program; if not, write to the Free Software</span>
- <a name="l00017"></a>00017 <span class="comment"> Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
- <a name="l00018"></a>00018 <span class="comment">*/</span>
- <a name="l00019"></a>00019
- <a name="l00020"></a><a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">00020</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a> = 0; <span class="comment">// set in initgui</span>
- <a name="l00021"></a>00021
- <a name="l00022"></a>00022 <span class="preprocessor">#include <ctype.h></span>
- <a name="l00023"></a>00023 <span class="preprocessor">#include <stdio.h></span>
- <a name="l00024"></a>00024 <span class="preprocessor">#include <string.h></span>
- <a name="l00025"></a>00025 <span class="preprocessor">#include <stdlib.h></span>
- <a name="l00026"></a>00026 <span class="preprocessor">#include <math.h></span>
- <a name="l00027"></a>00027 <span class="preprocessor">#include <sys/time.h></span>
- <a name="l00028"></a>00028 <span class="preprocessor">#include <sys/resource.h></span>
- <a name="l00029"></a>00029 <span class="preprocessor">#include <X11/Xlib.h></span>
- <a name="l00030"></a>00030 <span class="preprocessor">#include <X11/Xutil.h></span>
- <a name="l00031"></a>00031 <span class="preprocessor">#include <X11/Xos.h></span>
- <a name="l00032"></a>00032 <span class="preprocessor">#include <X11/Xatom.h></span>
- <a name="l00033"></a>00033 <span class="preprocessor">#include <X11/keysym.h></span>
- <a name="l00034"></a>00034
- <a name="l00035"></a><a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">00035</a> <span class="preprocessor">#define INT int</span>
- <a name="l00036"></a><a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">00036</a> <span class="preprocessor"></span><span class="preprocessor">#define REAL float</span>
- <a name="l00037"></a><a class="code" href="pumax_8c.html#af03d9314df919290b49b331146eab250">00037</a> <span class="preprocessor"></span><span class="preprocessor">#define INTXU unsigned int</span>
- <a name="l00038"></a><a class="code" href="pumax_8c.html#a83e35c70462fc81d9b622790c8661e8e">00038</a> <span class="preprocessor"></span><span class="preprocessor">#define INTXS int</span>
- <a name="l00039"></a>00039 <span class="preprocessor"></span>
- <a name="l00040"></a>00040 <span class="preprocessor">#ifndef MIN</span>
- <a name="l00041"></a><a class="code" href="pumax_8c.html#a3acffbd305ee72dcd4593c0d8af64a4f">00041</a> <span class="preprocessor"></span><span class="preprocessor">#define MIN(a,b) ((a) < (b) ? (a) : (b))</span>
- <a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
- <a name="l00043"></a>00043 <span class="preprocessor"></span>
- <a name="l00044"></a>00044 <span class="preprocessor">#ifndef MAX</span>
- <a name="l00045"></a><a class="code" href="pumax_8c.html#afa99ec4acc4ecb2dc3c2d05da15d0e3f">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define MAX(a,b) ((a) > (b) ? (a) : (b))</span>
- <a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
- <a name="l00047"></a>00047 <span class="preprocessor"></span>
- <a name="l00048"></a><a class="code" href="pumax_8c.html#ae880d2ccffb14a9a68b859d09f22e12a">00048</a> <span class="preprocessor">#define ROTATE_LEFT (XK_Left)</span>
- <a name="l00049"></a><a class="code" href="pumax_8c.html#a03653d3bb216e366e5f0144e79554a39">00049</a> <span class="preprocessor"></span><span class="preprocessor">#define ROTATE_RIGHT (XK_Right)</span>
- <a name="l00050"></a>00050 <span class="preprocessor"></span>
- <a name="l00051"></a><a class="code" href="pumax_8c.html#a5290d0773637802c437cf688938b1fe9">00051</a> <span class="preprocessor">#define TOLELO 0x0001</span>
- <a name="l00052"></a><a class="code" href="pumax_8c.html#a23aceec46faeb7e48b2883afca874b02">00052</a> <span class="preprocessor"></span><span class="preprocessor">#define TOLEHI 0x0002</span>
- <a name="l00053"></a><a class="code" href="pumax_8c.html#a89053abaa38cd43b0dbdbf70f6f644bd">00053</a> <span class="preprocessor"></span><span class="preprocessor">#define TORILO 0x0004</span>
- <a name="l00054"></a><a class="code" href="pumax_8c.html#a00b399ecbf8e7ce66fc45ae97d0ef149">00054</a> <span class="preprocessor"></span><span class="preprocessor">#define TORIHI 0x0008</span>
- <a name="l00055"></a><a class="code" href="pumax_8c.html#a26b56bf73405ae78f65554674d5bee88">00055</a> <span class="preprocessor"></span><span class="preprocessor">#define BOLELO 0x0010</span>
- <a name="l00056"></a><a class="code" href="pumax_8c.html#aec2de7a30131a34fd4a1475ef8120fc3">00056</a> <span class="preprocessor"></span><span class="preprocessor">#define BOLEHI 0x0020</span>
- <a name="l00057"></a><a class="code" href="pumax_8c.html#ac392454edf5f88606de52c510958b37b">00057</a> <span class="preprocessor"></span><span class="preprocessor">#define BORILO 0x0040</span>
- <a name="l00058"></a><a class="code" href="pumax_8c.html#ad2487d10128a4605d2c520818e714817">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define BORIHI 0x0080</span>
- <a name="l00059"></a><a class="code" href="pumax_8c.html#a5f7b96511475eae60c0ec799497cd90d">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define TOLEIN 0x0100</span>
- <a name="l00060"></a><a class="code" href="pumax_8c.html#ab9fb8c5f3129d06df9e3d04b46f331c4">00060</a> <span class="preprocessor"></span><span class="preprocessor">#define TOREIN 0x0200</span>
- <a name="l00061"></a><a class="code" href="pumax_8c.html#a4813a896f0863ba6435dc000ef2148d1">00061</a> <span class="preprocessor"></span><span class="preprocessor">#define BOLEIN 0x0400</span>
- <a name="l00062"></a><a class="code" href="pumax_8c.html#a77808b38279936748a451a902ec442a4">00062</a> <span class="preprocessor"></span><span class="preprocessor">#define BOREIN 0x0800</span>
- <a name="l00063"></a>00063 <span class="preprocessor"></span>
- <a name="l00064"></a><a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">00064</a> <span class="preprocessor">#define IPX(l,m,h) (VGAX * (x + (l-m) / (l-h)))</span>
- <a name="l00065"></a><a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">00065</a> <span class="preprocessor"></span><span class="preprocessor">#define IPY(l,m,h) (VGAY * (y + (l-m) / (l-h)))</span>
- <a name="l00066"></a>00066 <span class="preprocessor"></span>
- <a name="l00067"></a><a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">00067</a> <span class="preprocessor">#define NUMWIN 9</span>
- <a name="l00068"></a><a class="code" href="pumax_8c.html#afa68e13002f97f4041b7acca426be273">00068</a> <span class="preprocessor"></span><span class="preprocessor">#define NUMPAL 13</span>
- <a name="l00069"></a>00069 <span class="preprocessor"></span>
- <a name="l00070"></a>00070 <span class="comment">/* Picture types */</span>
- <a name="l00071"></a>00071
- <a name="l00072"></a><a class="code" href="pumax_8c.html#a2f1d89ef346ef5189b556085f4553c4c">00072</a> <span class="preprocessor">#define ISOHOR 0</span>
- <a name="l00073"></a><a class="code" href="pumax_8c.html#afc9e7bd37f3dc38ff12cdf5edb85a6d2">00073</a> <span class="preprocessor"></span><span class="preprocessor">#define ISOCS 1</span>
- <a name="l00074"></a><a class="code" href="pumax_8c.html#a5cacfe29b73c60abfa48f1ab23b8d631">00074</a> <span class="preprocessor"></span><span class="preprocessor">#define ISOHOV 2</span>
- <a name="l00075"></a><a class="code" href="pumax_8c.html#ad93abacbefeab6ede34e9110ebce9769">00075</a> <span class="preprocessor"></span><span class="preprocessor">#define ISOTS 3</span>
- <a name="l00076"></a><a class="code" href="pumax_8c.html#aa817497929617f9ee37a0e957c9e21e1">00076</a> <span class="preprocessor"></span><span class="preprocessor">#define ISOTAB 4</span>
- <a name="l00077"></a><a class="code" href="pumax_8c.html#ae41274f4b33dfd046884def7709aa887">00077</a> <span class="preprocessor"></span><span class="preprocessor">#define ISOSH 5</span>
- <a name="l00078"></a><a class="code" href="pumax_8c.html#ad3652a10b82037800a3efb555fb7833c">00078</a> <span class="preprocessor"></span><span class="preprocessor">#define ISOLON 6</span>
- <a name="l00079"></a><a class="code" href="pumax_8c.html#a4c30d0a50533694deda0fcf3551b6935">00079</a> <span class="preprocessor"></span><span class="preprocessor">#define ISOTRA 7</span>
- <a name="l00080"></a><a class="code" href="pumax_8c.html#a35e0c3caf44835d5c02d3af3b975e21b">00080</a> <span class="preprocessor"></span><span class="preprocessor">#define ISOCOL 8</span>
- <a name="l00081"></a><a class="code" href="pumax_8c.html#aa432935ef1f77c464765c0e3106ad340">00081</a> <span class="preprocessor"></span><span class="preprocessor">#define ISOROT 9</span>
- <a name="l00082"></a><a class="code" href="pumax_8c.html#a3e3bcad4c273544328bcdcaef35c3852">00082</a> <span class="preprocessor"></span><span class="preprocessor">#define MAPHOR 10</span>
- <a name="l00083"></a><a class="code" href="pumax_8c.html#a1572b520f538d357372e96d0185275e5">00083</a> <span class="preprocessor"></span><span class="preprocessor">#define MAPTRA 11</span>
- <a name="l00084"></a>00084 <span class="preprocessor"></span>
- <a name="l00085"></a>00085 <span class="comment">/* Models */</span>
- <a name="l00086"></a>00086
- <a name="l00087"></a><a class="code" href="pumax_8c.html#a7c5db3163704e174dd734f55fdc698e9">00087</a> <span class="preprocessor">#define PUMA 0</span>
- <a name="l00088"></a>00088 <span class="preprocessor"></span>
- <a name="l00089"></a><a class="code" href="pumax_8c.html#a521281f5e10ed8f5e4cdb50ead3b2612">00089</a> <span class="keywordtype">char</span> *<a class="code" href="pumax_8c.html#a521281f5e10ed8f5e4cdb50ead3b2612">IsoNames</a>[] =
- <a name="l00090"></a>00090 {
- <a name="l00091"></a>00091 <span class="stringliteral">"ISOHOR"</span>,
- <a name="l00092"></a>00092 <span class="stringliteral">"ISOCS"</span>,
- <a name="l00093"></a>00093 <span class="stringliteral">"ISOHOV"</span>,
- <a name="l00094"></a>00094 <span class="stringliteral">"ISOTS"</span>,
- <a name="l00095"></a>00095 <span class="stringliteral">"ISOTAB"</span>,
- <a name="l00096"></a>00096 <span class="stringliteral">"ISOSH"</span>,
- <a name="l00097"></a>00097 <span class="stringliteral">"ISOLON"</span>,
- <a name="l00098"></a>00098 <span class="stringliteral">"ISOTRA"</span>,
- <a name="l00099"></a>00099 <span class="stringliteral">"ISOCOL"</span>,
- <a name="l00100"></a>00100 <span class="stringliteral">"ISOROT"</span>,
- <a name="l00101"></a>00101 <span class="stringliteral">"MAPHOR"</span>,
- <a name="l00102"></a>00102 <span class="stringliteral">"MAPTRA"</span>
- <a name="l00103"></a>00103 };
- <a name="l00104"></a>00104
- <a name="l00105"></a><a class="code" href="pumax_8c.html#a834a993015b3b6e5f609501c9ada9ce7">00105</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a834a993015b3b6e5f609501c9ada9ce7">IsoTypes</a> = <span class="keyword">sizeof</span>(<a class="code" href="pumax_8c.html#a521281f5e10ed8f5e4cdb50ead3b2612">IsoNames</a>) / <span class="keyword">sizeof</span>(<span class="keywordtype">char</span> *);
- <a name="l00106"></a>00106
- <a name="l00107"></a><a class="code" href="pumax_8c.html#a37a21fafd45eeb427d40623be31f13c5">00107</a> <span class="keywordtype">char</span> *<a class="code" href="pumax_8c.html#a37a21fafd45eeb427d40623be31f13c5">PalNames</a>[] =
- <a name="l00108"></a>00108 {
- <a name="l00109"></a>00109 <span class="stringliteral">"AUTO"</span>,
- <a name="l00110"></a>00110 <span class="stringliteral">"U"</span>,
- <a name="l00111"></a>00111 <span class="stringliteral">"V"</span>,
- <a name="l00112"></a>00112 <span class="stringliteral">"T"</span>,
- <a name="l00113"></a>00113 <span class="stringliteral">"P"</span>,
- <a name="l00114"></a>00114 <span class="stringliteral">"Q"</span>,
- <a name="l00115"></a>00115 <span class="stringliteral">"MARST"</span>,
- <a name="l00116"></a>00116 <span class="stringliteral">"AMPLI"</span>,
- <a name="l00117"></a>00117 <span class="stringliteral">"VEG"</span>,
- <a name="l00118"></a>00118 <span class="stringliteral">"OCET"</span>,
- <a name="l00119"></a>00119 <span class="stringliteral">"OCES"</span>,
- <a name="l00120"></a>00120 <span class="stringliteral">"DCC"</span>,
- <a name="l00121"></a>00121 <span class="stringliteral">"DTDT"</span>
- <a name="l00122"></a>00122 };
- <a name="l00123"></a>00123
- <a name="l00124"></a><a class="code" href="pumax_8c.html#a51158475dcc6ea9c026070a471573cf9">00124</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a51158475dcc6ea9c026070a471573cf9">PalTypes</a> = <span class="keyword">sizeof</span>(<a class="code" href="pumax_8c.html#a37a21fafd45eeb427d40623be31f13c5">PalNames</a>) / <span class="keyword">sizeof</span>(<span class="keywordtype">char</span> *);
- <a name="l00125"></a>00125
- <a name="l00126"></a>00126 <span class="comment">/* Map projections */</span>
- <a name="l00127"></a>00127
- <a name="l00128"></a><a class="code" href="pumax_8c.html#afc5baef270da4d092b8e86c03bf949ad">00128</a> <span class="preprocessor">#define CYLINDRICAL 0</span>
- <a name="l00129"></a><a class="code" href="pumax_8c.html#ad431eb8cf00095009fcd1924efffa213">00129</a> <span class="preprocessor"></span><span class="preprocessor">#define POLAR 1</span>
- <a name="l00130"></a><a class="code" href="pumax_8c.html#aae4090be0e30c18b0f22650479767d8f">00130</a> <span class="preprocessor"></span><span class="preprocessor">#define AZIMUTHAL 2</span>
- <a name="l00131"></a>00131 <span class="preprocessor"></span>
- <a name="l00132"></a><a class="code" href="pumax_8c.html#a3b66883efb152a59e42802d74245ae5a">00132</a> <span class="preprocessor">#define MAXMAPS 3</span>
- <a name="l00133"></a>00133 <span class="preprocessor"></span>
- <a name="l00134"></a><a class="code" href="pumax_8c.html#a5659144282d3965ba43ddb5cf0855b06">00134</a> <span class="keywordtype">char</span> *<a class="code" href="pumax_8c.html#a5659144282d3965ba43ddb5cf0855b06">ProNames</a>[] =
- <a name="l00135"></a>00135 {
- <a name="l00136"></a>00136 <span class="stringliteral">"CYLINDRICAL"</span>,
- <a name="l00137"></a>00137 <span class="stringliteral">"POLAR"</span>,
- <a name="l00138"></a>00138 <span class="stringliteral">"AZIMUTHAL"</span>
- <a name="l00139"></a>00139 };
- <a name="l00140"></a>00140
- <a name="l00141"></a>00141
- <a name="l00142"></a>00142 <span class="comment">/* Coordinates of button areas */</span>
- <a name="l00143"></a>00143
- <a name="l00144"></a><a class="code" href="pumax_8c.html#a55bccb7615db7906d83dfde784e900ca">00144</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a55bccb7615db7906d83dfde784e900ca">ShowQueue</a> = 0;
- <a name="l00145"></a><a class="code" href="pumax_8c.html#a30026665e31656bee8b8742fa67aca6e">00145</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a30026665e31656bee8b8742fa67aca6e">ShowOnce</a> = 1;
- <a name="l00146"></a><a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">00146</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a> = 20;
- <a name="l00147"></a>00147
- <a name="l00148"></a><a class="code" href="pumax_8c.html#ad24990368c579bb1864cbc8c3ce3e721">00148</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ad24990368c579bb1864cbc8c3ce3e721">Stop_XL</a>;
- <a name="l00149"></a><a class="code" href="pumax_8c.html#a4b06c4dca623e48a89ca4cd41a78629e">00149</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a4b06c4dca623e48a89ca4cd41a78629e">Stop_XH</a>;
- <a name="l00150"></a><a class="code" href="pumax_8c.html#a91b3c0f8c4770ad36e64106a0aebc691">00150</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a91b3c0f8c4770ad36e64106a0aebc691">Stop_YL</a>;
- <a name="l00151"></a><a class="code" href="pumax_8c.html#a8e6314067e8a239ee1389b87e06d60d6">00151</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a8e6314067e8a239ee1389b87e06d60d6">Stop_YH</a>;
- <a name="l00152"></a>00152
- <a name="l00153"></a><a class="code" href="pumax_8c.html#a88857d63fe1d8cbdfee28fd0839416d0">00153</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a88857d63fe1d8cbdfee28fd0839416d0">Start_XL</a>;
- <a name="l00154"></a><a class="code" href="pumax_8c.html#a8a1c7807764e545cae05ec82d33db998">00154</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a8a1c7807764e545cae05ec82d33db998">Start_XH</a>;
- <a name="l00155"></a><a class="code" href="pumax_8c.html#aa6b7da43e548f98c9c0a1aa042955e53">00155</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#aa6b7da43e548f98c9c0a1aa042955e53">Start_YL</a>;
- <a name="l00156"></a><a class="code" href="pumax_8c.html#ad7f26c40f9aa636fc053415fa4a49649">00156</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ad7f26c40f9aa636fc053415fa4a49649">Start_YH</a>;
- <a name="l00157"></a>00157
- <a name="l00158"></a><a class="code" href="pumax_8c.html#aa5937b1ae55303df3b9e9d865aef1411">00158</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#aa5937b1ae55303df3b9e9d865aef1411">Pause_XL</a>;
- <a name="l00159"></a><a class="code" href="pumax_8c.html#a941d0cebf5d93486d5c5c4ee7adccb13">00159</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a941d0cebf5d93486d5c5c4ee7adccb13">Pause_XH</a>;
- <a name="l00160"></a><a class="code" href="pumax_8c.html#a62f16cafe798c067ab8a6effb26b21c2">00160</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a62f16cafe798c067ab8a6effb26b21c2">Pause_YL</a>;
- <a name="l00161"></a><a class="code" href="pumax_8c.html#a335dc1da623733cdc46be9818f7faeb5">00161</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a335dc1da623733cdc46be9818f7faeb5">Pause_YH</a>;
- <a name="l00162"></a>00162
- <a name="l00163"></a><a class="code" href="pumax_8c.html#a8bfeeb88bca700f71c0452ac7dbb6305">00163</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a8bfeeb88bca700f71c0452ac7dbb6305">Help_XL</a>;
- <a name="l00164"></a><a class="code" href="pumax_8c.html#aa5ac3fa76bbe5c45098ab00e18d7cf1c">00164</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#aa5ac3fa76bbe5c45098ab00e18d7cf1c">Help_XH</a>;
- <a name="l00165"></a><a class="code" href="pumax_8c.html#a3ce4455dd3233998629c417853f31360">00165</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a3ce4455dd3233998629c417853f31360">Help_YL</a>;
- <a name="l00166"></a><a class="code" href="pumax_8c.html#a2bbd0d368ae6db480004cff4af321f0a">00166</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a2bbd0d368ae6db480004cff4af321f0a">Help_YH</a>;
- <a name="l00167"></a>00167
- <a name="l00168"></a><a class="code" href="pumax_8c.html#ab832698174a27897c4f45e1ed274fb77">00168</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ab832698174a27897c4f45e1ed274fb77">Minus_XL</a>;
- <a name="l00169"></a><a class="code" href="pumax_8c.html#afc5898a8a6b1361c5bca44e01339565b">00169</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#afc5898a8a6b1361c5bca44e01339565b">Minus_XH</a>;
- <a name="l00170"></a><a class="code" href="pumax_8c.html#a8eed85ad2425df37d1a278571e0e2268">00170</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a8eed85ad2425df37d1a278571e0e2268">Minus_YL</a>;
- <a name="l00171"></a><a class="code" href="pumax_8c.html#a9f064372aac5b9c6646ae41c1366dd67">00171</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a9f064372aac5b9c6646ae41c1366dd67">Minus_YH</a>;
- <a name="l00172"></a>00172
- <a name="l00173"></a><a class="code" href="pumax_8c.html#a7ba7f7c48b83e9dd7786f1430b118aaa">00173</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a7ba7f7c48b83e9dd7786f1430b118aaa">FBWD_XL</a>;
- <a name="l00174"></a><a class="code" href="pumax_8c.html#a2a4481c974f1e07e30e458c860d1148c">00174</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a2a4481c974f1e07e30e458c860d1148c">FBWD_XH</a>;
- <a name="l00175"></a><a class="code" href="pumax_8c.html#a202a87cbecd2d4b3d862aa705eae5537">00175</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a202a87cbecd2d4b3d862aa705eae5537">FBWD_YL</a>;
- <a name="l00176"></a><a class="code" href="pumax_8c.html#a96b9387b1bc2c8556579b7d4ef5fdb29">00176</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a96b9387b1bc2c8556579b7d4ef5fdb29">FBWD_YH</a>;
- <a name="l00177"></a>00177
- <a name="l00178"></a><a class="code" href="pumax_8c.html#ad4a5ddea9738fe7d909456d4a32fe428">00178</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ad4a5ddea9738fe7d909456d4a32fe428">Plus_XL</a>;
- <a name="l00179"></a><a class="code" href="pumax_8c.html#a14958f61e1a0ee0b8e89c94a4460e338">00179</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a14958f61e1a0ee0b8e89c94a4460e338">Plus_XH</a>;
- <a name="l00180"></a><a class="code" href="pumax_8c.html#ad45d3847d400c8c39d830bd219eee39f">00180</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ad45d3847d400c8c39d830bd219eee39f">Plus_YL</a>;
- <a name="l00181"></a><a class="code" href="pumax_8c.html#a6a42672cdcc2c6cca8c6d3670fecd7c3">00181</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a6a42672cdcc2c6cca8c6d3670fecd7c3">Plus_YH</a>;
- <a name="l00182"></a>00182
- <a name="l00183"></a><a class="code" href="pumax_8c.html#a493618c426beabf157dbbebef440412f">00183</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a493618c426beabf157dbbebef440412f">FFWD_XL</a>;
- <a name="l00184"></a><a class="code" href="pumax_8c.html#abce69811070050cf5376b801b3990d07">00184</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#abce69811070050cf5376b801b3990d07">FFWD_XH</a>;
- <a name="l00185"></a><a class="code" href="pumax_8c.html#acaf325c4292608bd8c889977fd15e154">00185</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#acaf325c4292608bd8c889977fd15e154">FFWD_YL</a>;
- <a name="l00186"></a><a class="code" href="pumax_8c.html#aa98699812a1c44b825154ce059b16901">00186</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#aa98699812a1c44b825154ce059b16901">FFWD_YH</a>;
- <a name="l00187"></a>00187
- <a name="l00188"></a><a class="code" href="pumax_8c.html#ae373f8d537ec4fe119fa2f056a1026b6">00188</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ae373f8d537ec4fe119fa2f056a1026b6">Parc_XL</a>;
- <a name="l00189"></a><a class="code" href="pumax_8c.html#a11016a2a4ce39e73044ca7b91c9b9834">00189</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a11016a2a4ce39e73044ca7b91c9b9834">Parc_XH</a>;
- <a name="l00190"></a><a class="code" href="pumax_8c.html#a66f79d4b0d0e901fc506292532e47140">00190</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a66f79d4b0d0e901fc506292532e47140">Parc_XD</a>;
- <a name="l00191"></a><a class="code" href="pumax_8c.html#ae13ffbf97704d055020c491c4e74ff0f">00191</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ae13ffbf97704d055020c491c4e74ff0f">Parc_YL</a>;
- <a name="l00192"></a><a class="code" href="pumax_8c.html#aa23d097ca998e5e55e701dc31d2739fc">00192</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#aa23d097ca998e5e55e701dc31d2739fc">Parc_YH</a>;
- <a name="l00193"></a><a class="code" href="pumax_8c.html#a6cfaf9b0896544285a021d496043517f">00193</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a6cfaf9b0896544285a021d496043517f">Parc_YD</a>;
- <a name="l00194"></a>00194
- <a name="l00195"></a><a class="code" href="pumax_8c.html#a34c9aca7c9d3e891e823db12a7521fe2">00195</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a34c9aca7c9d3e891e823db12a7521fe2">Wbox_XL</a>;
- <a name="l00196"></a><a class="code" href="pumax_8c.html#a91db002a6cd9e7b9151c2a55cbd816be">00196</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a91db002a6cd9e7b9151c2a55cbd816be">Wbox_XH</a>;
- <a name="l00197"></a><a class="code" href="pumax_8c.html#a7dd050c049730eaa17780c85db427571">00197</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a7dd050c049730eaa17780c85db427571">Wbox_YL</a>;
- <a name="l00198"></a><a class="code" href="pumax_8c.html#a28605df273e4c600abe43e5cba54c54d">00198</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a28605df273e4c600abe43e5cba54c54d">Wbox_YH</a>;
- <a name="l00199"></a>00199
- <a name="l00200"></a><a class="code" href="pumax_8c.html#adbf17b3e938de11e352f68acd0273ada">00200</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#adbf17b3e938de11e352f68acd0273ada">Grid_XL</a>;
- <a name="l00201"></a><a class="code" href="pumax_8c.html#ab72ce760d251cc0020a579cdb987c881">00201</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ab72ce760d251cc0020a579cdb987c881">Grid_XH</a>;
- <a name="l00202"></a><a class="code" href="pumax_8c.html#af60996257395d9ddc45200ad8dd9a4ae">00202</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#af60996257395d9ddc45200ad8dd9a4ae">Grid_YL</a>;
- <a name="l00203"></a><a class="code" href="pumax_8c.html#a350e09c829698cdbbf05b10551a82671">00203</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a350e09c829698cdbbf05b10551a82671">Grid_YH</a>;
- <a name="l00204"></a>00204
- <a name="l00205"></a><a class="code" href="pumax_8c.html#ab30678c46d43e623c90639d5e71d7d5c">00205</a> XPoint <a class="code" href="pumax_8c.html#ab30678c46d43e623c90639d5e71d7d5c">StopButton</a>[4] = {{10,10},{40,10},{40,40},{10,40}};
- <a name="l00206"></a><a class="code" href="pumax_8c.html#a96eeb7df5a5d181536249e70733371b8">00206</a> XPoint <a class="code" href="pumax_8c.html#a96eeb7df5a5d181536249e70733371b8">StartButton</a>[3] = {{50,10},{80,25},{50,40}};
- <a name="l00207"></a><a class="code" href="pumax_8c.html#ad98a1896b9076d6d94dd002922c2f0dc">00207</a> XPoint <a class="code" href="pumax_8c.html#ad98a1896b9076d6d94dd002922c2f0dc">PauseButton1</a>[4] = {{95,10},{102,10},{102,40},{95,40}};
- <a name="l00208"></a><a class="code" href="pumax_8c.html#a7bb723eb33c840844906c7b42c5bb99b">00208</a> XPoint <a class="code" href="pumax_8c.html#a7bb723eb33c840844906c7b42c5bb99b">PauseButton2</a>[4] = {{108,10},{115,10},{115,40},{108,40}};
- <a name="l00209"></a>00209
- <a name="l00210"></a><a class="code" href="pumax_8c.html#a90b6c7836a1eb1537db72ccc21295413">00210</a> <span class="preprocessor">#define PARCS 100</span>
- <a name="l00211"></a>00211 <span class="preprocessor"></span>
- <a name="l00212"></a><a class="code" href="struct_parc_struct.html">00212</a> <span class="keyword">struct </span><a class="code" href="struct_parc_struct.html">ParcStruct</a>
- <a name="l00213"></a>00213 {
- <a name="l00214"></a><a class="code" href="struct_parc_struct.html#ac9d04b9041919c070a322e95865dd52d">00214</a> <span class="keywordtype">char</span> <a class="code" href="struct_parc_struct.html#ac9d04b9041919c070a322e95865dd52d">Name</a>[8];
- <a name="l00215"></a><a class="code" href="struct_parc_struct.html#a8228d63eefa1fb42c060ab069bcf2a1b">00215</a> <span class="keywordtype">float</span> <a class="code" href="struct_parc_struct.html#a8228d63eefa1fb42c060ab069bcf2a1b">Inc</a>;
- <a name="l00216"></a><a class="code" href="struct_parc_struct.html#a2a2d6960e03fa37291f0fff4402f4a38">00216</a> <span class="keywordtype">float</span> <a class="code" href="struct_parc_struct.html#a2a2d6960e03fa37291f0fff4402f4a38">Min</a>;
- <a name="l00217"></a><a class="code" href="struct_parc_struct.html#a01b1f457258f82282fdeeb6d8d4fbd8b">00217</a> <span class="keywordtype">float</span> <a class="code" href="struct_parc_struct.html#a01b1f457258f82282fdeeb6d8d4fbd8b">Max</a>;
- <a name="l00218"></a><a class="code" href="struct_parc_struct.html#a4901f0bf816a2d336307e9e3fcc95d82">00218</a> <span class="keywordtype">float</span> <a class="code" href="struct_parc_struct.html#a4901f0bf816a2d336307e9e3fcc95d82">Val</a>;
- <a name="l00219"></a>00219 };
- <a name="l00220"></a>00220
- <a name="l00221"></a><a class="code" href="pumax_8c.html#a4444b7b37748213e596d8d51dfdb3315">00221</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a4444b7b37748213e596d8d51dfdb3315">Parcs</a>;
- <a name="l00222"></a><a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">00222</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a> = 1;
- <a name="l00223"></a>00223
- <a name="l00224"></a><a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">00224</a> <span class="keyword">struct </span><a class="code" href="struct_parc_struct.html">ParcStruct</a> <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#a90b6c7836a1eb1537db72ccc21295413">PARCS</a>];
- <a name="l00225"></a>00225
- <a name="l00226"></a><a class="code" href="pumax_8c.html#a80a50b0eff10ca625769bac2a9e15cd3">00226</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a80a50b0eff10ca625769bac2a9e15cd3">screen_num</a>;
- <a name="l00227"></a>00227
- <a name="l00228"></a><a class="code" href="pumax_8c.html#a854f9eb314f72feecf68ba03c6f0e5d5">00228</a> Display *<a class="code" href="pumax_8c.html#a854f9eb314f72feecf68ba03c6f0e5d5">display</a>;
- <a name="l00229"></a><a class="code" href="pumax_8c.html#a47745e91e472dc647c023d88e004f6be">00229</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a47745e91e472dc647c023d88e004f6be">ScreenW</a>,<a class="code" href="pumax_8c.html#a8b8a3a3a0640d58f940680ffabe74433">ScreenH</a>,<a class="code" href="pumax_8c.html#a2c52cfcbe626779731c3bb7bac1a6c43">ScreenBot</a>;
- <a name="l00230"></a><a class="code" href="pumax_8c.html#acac7568f426c5e9b9041b9270c252a6f">00230</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#acac7568f426c5e9b9041b9270c252a6f">SmallScreen</a>;
- <a name="l00231"></a>00231
- <a name="l00232"></a>00232 <span class="keyword">static</span> <span class="keywordtype">char</span> *progname = <span class="stringliteral">"PUMA"</span>;
- <a name="l00233"></a>00233
- <a name="l00234"></a><a class="code" href="pumax_8c.html#aee7525a437c583a9446fd55457f26003">00234</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#aee7525a437c583a9446fd55457f26003">BigEndian</a>;
- <a name="l00235"></a><a class="code" href="pumax_8c.html#a59713e313b4ee9b7937c09d8aeb88994">00235</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a59713e313b4ee9b7937c09d8aeb88994">ScreenOffset</a>;
- <a name="l00236"></a><a class="code" href="pumax_8c.html#af78e6c4aa716185050920dee4e224cb0">00236</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#af78e6c4aa716185050920dee4e224cb0">Model</a>;
- <a name="l00237"></a><a class="code" href="pumax_8c.html#ae150d767abfed25f0cb775bc4835c270">00237</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ae150d767abfed25f0cb775bc4835c270">CowX</a> = -1;
- <a name="l00238"></a><a class="code" href="pumax_8c.html#a3a22a7d3a3f9708bacfd622911f3d77a">00238</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a3a22a7d3a3f9708bacfd622911f3d77a">CowY</a> = -1;
- <a name="l00239"></a><a class="code" href="pumax_8c.html#a4c0dc1ddfa49f758e626fbe8e5e2259e">00239</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a4c0dc1ddfa49f758e626fbe8e5e2259e">CowW</a>;
- <a name="l00240"></a><a class="code" href="pumax_8c.html#a5d560d88e396adf0394249a56c20155a">00240</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a5d560d88e396adf0394249a56c20155a">CowH</a>;
- <a name="l00241"></a><a class="code" href="pumax_8c.html#a2364498cd60ebd2201eeef32ce76e882">00241</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a2364498cd60ebd2201eeef32ce76e882">NumWin</a> = <a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>;
- <a name="l00242"></a><a class="code" href="pumax_8c.html#ab861bd4dcef3d655198c4eb74dea5eb7">00242</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ab861bd4dcef3d655198c4eb74dea5eb7">WinCols</a> = 3;
- <a name="l00243"></a><a class="code" href="pumax_8c.html#ab109c22b7def164d1136cb9ceb9f6819">00243</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ab109c22b7def164d1136cb9ceb9f6819">WinRows</a> = 3;
- <a name="l00244"></a><a class="code" href="pumax_8c.html#ad690a03cd8fa2b253d17c3b93e6ad279">00244</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ad690a03cd8fa2b253d17c3b93e6ad279">DimT</a> = 100; <span class="comment">// Default length of time axis</span>
- <a name="l00245"></a><a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">00245</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l00246"></a><a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">00246</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a>;
- <a name="l00247"></a><a class="code" href="pumax_8c.html#a510628f6a0e0c51b4ca6492e4d8595e0">00247</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a510628f6a0e0c51b4ca6492e4d8595e0">DimZ</a>;
- <a name="l00248"></a><a class="code" href="pumax_8c.html#a132288db6a5e56bd89aedf01da72b83f">00248</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a132288db6a5e56bd89aedf01da72b83f">DimXY</a>;
- <a name="l00249"></a><a class="code" href="pumax_8c.html#abec6f96b33294d2bb005f4aa387ee123">00249</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#abec6f96b33294d2bb005f4aa387ee123">Uindex</a> = -1;
- <a name="l00250"></a><a class="code" href="pumax_8c.html#abb16042facad6e19f6bdada929a4522a">00250</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#abb16042facad6e19f6bdada929a4522a">Vindex</a> = -1;
- <a name="l00251"></a><a class="code" href="pumax_8c.html#adac66095f3e07979226ef488bdf3d568">00251</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#adac66095f3e07979226ef488bdf3d568">ScreenD</a>;
- <a name="l00252"></a><a class="code" href="pumax_8c.html#a67c8f2f939a4939efcfc51b1a2edff05">00252</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a67c8f2f939a4939efcfc51b1a2edff05">OffX</a>;
- <a name="l00253"></a><a class="code" href="pumax_8c.html#a10481cd98c85988914fe8442f4ba3d83">00253</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a10481cd98c85988914fe8442f4ba3d83">OffY</a> = 0;
- <a name="l00254"></a><a class="code" href="pumax_8c.html#a90fa18336f52663513916236b6c3f633">00254</a> <a class="code" href="pumax_8c.html#af03d9314df919290b49b331146eab250">INTXU</a> <a class="code" href="pumax_8c.html#a90fa18336f52663513916236b6c3f633">WinXSize</a>;
- <a name="l00255"></a><a class="code" href="pumax_8c.html#a48ba2c20a7bf82da8f16252eff21155f">00255</a> <a class="code" href="pumax_8c.html#af03d9314df919290b49b331146eab250">INTXU</a> <a class="code" href="pumax_8c.html#a48ba2c20a7bf82da8f16252eff21155f">WinYSize</a>;
- <a name="l00256"></a><a class="code" href="pumax_8c.html#a77751be4ce780fbc796f89264e0834ed">00256</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a77751be4ce780fbc796f89264e0834ed">InXSize</a>;
- <a name="l00257"></a><a class="code" href="pumax_8c.html#a2e0311fae05aa716cc8cd6669af5bf3a">00257</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a2e0311fae05aa716cc8cd6669af5bf3a">InYSize</a>;
- <a name="l00258"></a><a class="code" href="pumax_8c.html#af601e2b0de5522e6f9acdf65e5c43bc2">00258</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#af601e2b0de5522e6f9acdf65e5c43bc2">Latitudes</a>;
- <a name="l00259"></a><a class="code" href="pumax_8c.html#ab36270a976b49e0122723b7d3bd35b95">00259</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ab36270a976b49e0122723b7d3bd35b95">Lines</a>;
- <a name="l00260"></a><a class="code" href="pumax_8c.html#a37647cb75c90a99169413a49642c8611">00260</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a37647cb75c90a99169413a49642c8611">SizeChanged</a>;
- <a name="l00261"></a><a class="code" href="pumax_8c.html#ab21d9f37528b86a902a6729dd95ac59c">00261</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ab21d9f37528b86a902a6729dd95ac59c">Shutdown</a>;
- <a name="l00262"></a><a class="code" href="pumax_8c.html#a9666b9253809d418e00bcc929ee41c7d">00262</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a9666b9253809d418e00bcc929ee41c7d">Grid</a> = 1;
- <a name="l00263"></a><a class="code" href="pumax_8c.html#a6d9c0848297fe882ecce74ea9963f462">00263</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a6d9c0848297fe882ecce74ea9963f462">GridLabel</a> = 1;
- <a name="l00264"></a><a class="code" href="pumax_8c.html#a648bfcb426b534ebd09a13bb909de1fe">00264</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a648bfcb426b534ebd09a13bb909de1fe">WhitePix</a>;
- <a name="l00265"></a><a class="code" href="pumax_8c.html#abb3b996d0c52b1e0f9a831a8d937e2d1">00265</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#abb3b996d0c52b1e0f9a831a8d937e2d1">BlackPix</a>;
- <a name="l00266"></a><a class="code" href="pumax_8c.html#ad3d50d3f2f0fc27a24fc046d729b6155">00266</a> <span class="keywordtype">int</span> *<a class="code" href="pumax_8c.html#ad3d50d3f2f0fc27a24fc046d729b6155">Flag</a>;
- <a name="l00267"></a><a class="code" href="pumax_8c.html#a2614fd78fb3ee96f2b67767e60b66dfe">00267</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a2614fd78fb3ee96f2b67767e60b66dfe">FlagSize</a>;
- <a name="l00268"></a><a class="code" href="pumax_8c.html#a354c90bb46e1789fe52c4759474c2c89">00268</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a354c90bb46e1789fe52c4759474c2c89">nstep</a>;
- <a name="l00269"></a><a class="code" href="pumax_8c.html#ab9a7287ec3c070d1dffbd02bd4aa1c86">00269</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ab9a7287ec3c070d1dffbd02bd4aa1c86">MRpid</a>;
- <a name="l00270"></a><a class="code" href="pumax_8c.html#ab2b040ca53dcfaf86f045dc2179c9887">00270</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ab2b040ca53dcfaf86f045dc2179c9887">MRnum</a>;
- <a name="l00271"></a><a class="code" href="pumax_8c.html#a2ae9d213102d3a7fbde45a73783575d6">00271</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a2ae9d213102d3a7fbde45a73783575d6">wto</a>;
- <a name="l00272"></a><a class="code" href="pumax_8c.html#a7d187d3be57e785fee45a7dfc5475595">00272</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a7d187d3be57e785fee45a7dfc5475595">FirstKey</a>;
- <a name="l00273"></a><a class="code" href="pumax_8c.html#a715fabcdc382c085e09d0bd3a8a44419">00273</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a715fabcdc382c085e09d0bd3a8a44419">LastKey</a>;
- <a name="l00274"></a><a class="code" href="pumax_8c.html#a062a9acafe50b7d73d1215b89db404ca">00274</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a062a9acafe50b7d73d1215b89db404ca">SymsPerKey</a>;
- <a name="l00275"></a>00275
- <a name="l00276"></a><a class="code" href="pumax_8c.html#a54e4f2083c262944eff0a7bab8a38d45">00276</a> KeySym *<a class="code" href="pumax_8c.html#a54e4f2083c262944eff0a7bab8a38d45">KeyMap</a>;
- <a name="l00277"></a>00277
- <a name="l00278"></a><a class="code" href="pumax_8c.html#a30906e2ef97b75bee8e3bc1fa6a28fe5">00278</a> <span class="keywordtype">char</span> <a class="code" href="pumax_8c.html#a30906e2ef97b75bee8e3bc1fa6a28fe5">wtrun</a>[8];
- <a name="l00279"></a>00279
- <a name="l00280"></a><a class="code" href="pumax_8c.html#ac598ebcf7264580721b98e54e677f6a5">00280</a> <span class="keywordtype">unsigned</span> <a class="code" href="pumax_8c.html#ac598ebcf7264580721b98e54e677f6a5">Seed</a>;
- <a name="l00281"></a>00281
- <a name="l00282"></a><a class="code" href="pumax_8c.html#aa62b318359708cb3e3c6f55cac884a6f">00282</a> <span class="keywordtype">float</span> <a class="code" href="pumax_8c.html#aa62b318359708cb3e3c6f55cac884a6f">RotInc</a> = 0.2;
- <a name="l00283"></a><a class="code" href="pumax_8c.html#ab3b6560558b106451f0c595266a4008b">00283</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ab3b6560558b106451f0c595266a4008b">LineCo</a>[<a class="code" href="pumax_8c.html#afa68e13002f97f4041b7acca426be273">NUMPAL</a>];
- <a name="l00284"></a><a class="code" href="pumax_8c.html#aff0dad8f0ac5215da2a7c4b11c3e4468">00284</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#aff0dad8f0ac5215da2a7c4b11c3e4468">MapPro</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00285"></a><a class="code" href="pumax_8c.html#a2182d818b0a9e826a785d20569737ccd">00285</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a2182d818b0a9e826a785d20569737ccd">HovInx</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00286"></a><a class="code" href="pumax_8c.html#a11dbbddba6dfe322e045aad50cc5574d">00286</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a11dbbddba6dfe322e045aad50cc5574d">Indez</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00287"></a><a class="code" href="pumax_8c.html#a21866fc3d7bd54b53ffe87891960f97a">00287</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a21866fc3d7bd54b53ffe87891960f97a">MaxZ</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00288"></a><a class="code" href="pumax_8c.html#a3f73bc9148abc81a853c4228c6b87a00">00288</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a3f73bc9148abc81a853c4228c6b87a00">RedrawFlag</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00289"></a><a class="code" href="pumax_8c.html#ac09f2715f235eaeb2b9696ebdab80d52">00289</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ac09f2715f235eaeb2b9696ebdab80d52">LevelChanged</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00290"></a><a class="code" href="pumax_8c.html#ac6850477764909ccb55d8738e5c2d305">00290</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ac6850477764909ccb55d8738e5c2d305">RotLon</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00291"></a><a class="code" href="pumax_8c.html#a3d10b63bd2fac264767466d69695742c">00291</a> <span class="keywordtype">double</span> <a class="code" href="pumax_8c.html#a3d10b63bd2fac264767466d69695742c">AutoDelta</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00292"></a><a class="code" href="pumax_8c.html#a6bd313ef1429f92259b6593d39648d60">00292</a> <span class="keywordtype">double</span> <a class="code" href="pumax_8c.html#a6bd313ef1429f92259b6593d39648d60">AutoXdelt</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00293"></a><a class="code" href="pumax_8c.html#af384ac77c027bcbfc55da730907d6ec9">00293</a> <span class="keywordtype">double</span> <a class="code" href="pumax_8c.html#af384ac77c027bcbfc55da730907d6ec9">AutoLo</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00294"></a><a class="code" href="pumax_8c.html#afcb1ab97f5789b6011d9d36d9da23e16">00294</a> <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *<a class="code" href="pumax_8c.html#afcb1ab97f5789b6011d9d36d9da23e16">TSdata</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00295"></a><a class="code" href="pumax_8c.html#a0f50dd877e595f2d0cce25934fe6b036">00295</a> <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *<a class="code" href="pumax_8c.html#a0f50dd877e595f2d0cce25934fe6b036">Dmin</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00296"></a><a class="code" href="pumax_8c.html#a0f00e6341c497388e98aab4c31d315b1">00296</a> <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *<a class="code" href="pumax_8c.html#a0f00e6341c497388e98aab4c31d315b1">Dmax</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00297"></a><a class="code" href="pumax_8c.html#adfd726c7badd3f4544bd2dced3370b55">00297</a> <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *<a class="code" href="pumax_8c.html#adfd726c7badd3f4544bd2dced3370b55">SpeedScale</a>;
- <a name="l00298"></a><a class="code" href="pumax_8c.html#ad7b7228c407befc7b493ab605367f826">00298</a> XPoint *<a class="code" href="pumax_8c.html#ad7b7228c407befc7b493ab605367f826">TSxp</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00299"></a>00299
- <a name="l00300"></a>00300
- <a name="l00301"></a><a class="code" href="pumax_8c.html#ab5a0dcea45727946af71ece4d11e0278">00301</a> <span class="preprocessor">#define MAXPAR 16384</span>
- <a name="l00302"></a><a class="code" href="pumax_8c.html#ab78a69f0e1b74a165ba4532edf790fa9">00302</a> <span class="preprocessor"></span><span class="keywordtype">float</span> <a class="code" href="pumax_8c.html#ab78a69f0e1b74a165ba4532edf790fa9">pax</a>[<a class="code" href="pumax_8c.html#ab5a0dcea45727946af71ece4d11e0278">MAXPAR</a>];
- <a name="l00303"></a><a class="code" href="pumax_8c.html#a43bc8d599fb2e9201171d162aa46914a">00303</a> <span class="keywordtype">float</span> <a class="code" href="pumax_8c.html#a43bc8d599fb2e9201171d162aa46914a">pay</a>[<a class="code" href="pumax_8c.html#ab5a0dcea45727946af71ece4d11e0278">MAXPAR</a>];
- <a name="l00304"></a><a class="code" href="pumax_8c.html#a90b1e0ef9cf6b06a7711e79eaa1e0618">00304</a> <span class="keywordtype">long</span> <a class="code" href="pumax_8c.html#a90b1e0ef9cf6b06a7711e79eaa1e0618">pal</a>[<a class="code" href="pumax_8c.html#ab5a0dcea45727946af71ece4d11e0278">MAXPAR</a>];
- <a name="l00305"></a>00305
- <a name="l00306"></a><a class="code" href="pumax_8c.html#a4953e093f6fdda1d77968eb75bc0ba4d">00306</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a4953e093f6fdda1d77968eb75bc0ba4d">Delpar</a> = 8; <span class="comment">/* Interval for particle injection */</span>
- <a name="l00307"></a><a class="code" href="pumax_8c.html#ad9c64621bb1d0a098f803d806afe7549">00307</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ad9c64621bb1d0a098f803d806afe7549">ParInd</a> = 0;
- <a name="l00308"></a><a class="code" href="pumax_8c.html#ad3a3fa1de4fcbf5d06e0ac6277cb85a3">00308</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ad3a3fa1de4fcbf5d06e0ac6277cb85a3">ColInd</a> = 0;
- <a name="l00309"></a><a class="code" href="pumax_8c.html#a593e4a6696ba37b5108d683e031afc64">00309</a> <span class="keywordtype">long</span> <a class="code" href="pumax_8c.html#a593e4a6696ba37b5108d683e031afc64">TracerColor</a>;
- <a name="l00310"></a>00310
- <a name="l00311"></a><a class="code" href="pumax_8c.html#a82714a35091aa707ef0bc4c0ad18d7b2">00311</a> <span class="preprocessor">#define NUMSCALARS 9</span>
- <a name="l00312"></a>00312 <span class="preprocessor"></span>
- <a name="l00313"></a><a class="code" href="pumax_8c.html#aca4aea981815a0d54f9e4c49b70caf16">00313</a> <span class="keywordtype">char</span> <a class="code" href="pumax_8c.html#aca4aea981815a0d54f9e4c49b70caf16">TSName</a>[<a class="code" href="pumax_8c.html#a82714a35091aa707ef0bc4c0ad18d7b2">NUMSCALARS</a>][80];
- <a name="l00314"></a><a class="code" href="pumax_8c.html#a17ab69aa93eabd4faa61b559ac70b194">00314</a> <span class="keywordtype">char</span> <a class="code" href="pumax_8c.html#a17ab69aa93eabd4faa61b559ac70b194">TSubsc</a>[<a class="code" href="pumax_8c.html#a82714a35091aa707ef0bc4c0ad18d7b2">NUMSCALARS</a>][80];
- <a name="l00315"></a><a class="code" href="pumax_8c.html#a23076268f919a12b29a37f9c5d334529">00315</a> <span class="keywordtype">char</span> <a class="code" href="pumax_8c.html#a23076268f919a12b29a37f9c5d334529">TSUnit</a>[<a class="code" href="pumax_8c.html#a82714a35091aa707ef0bc4c0ad18d7b2">NUMSCALARS</a>][80];
- <a name="l00316"></a><a class="code" href="pumax_8c.html#a57f73cea5ae7a40e4d3b0a63dd7e09e8">00316</a> <span class="keywordtype">char</span> <a class="code" href="pumax_8c.html#a57f73cea5ae7a40e4d3b0a63dd7e09e8">TScale</a>[<a class="code" href="pumax_8c.html#a82714a35091aa707ef0bc4c0ad18d7b2">NUMSCALARS</a>][80];
- <a name="l00317"></a>00317
- <a name="l00318"></a><a class="code" href="struct_pix_struct.html">00318</a> <span class="keyword">struct </span><a class="code" href="struct_pix_struct.html">PixStruct</a>
- <a name="l00319"></a>00319 {
- <a name="l00320"></a><a class="code" href="struct_pix_struct.html#a8cfaa77a4a7e9675273fce59dc437ef4">00320</a> <span class="keywordtype">int</span> <a class="code" href="struct_pix_struct.html#a8cfaa77a4a7e9675273fce59dc437ef4">DimX</a>;
- <a name="l00321"></a><a class="code" href="struct_pix_struct.html#a605b726f604da7ec98575dec3da238c8">00321</a> <span class="keywordtype">int</span> <a class="code" href="struct_pix_struct.html#a605b726f604da7ec98575dec3da238c8">DimY</a>;
- <a name="l00322"></a><a class="code" href="struct_pix_struct.html#a7e7807591a26e2daa2f16ad2599a2b34">00322</a> Pixmap <a class="code" href="struct_pix_struct.html#a7e7807591a26e2daa2f16ad2599a2b34">Pix</a>;
- <a name="l00323"></a>00323 } <a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00324"></a>00324
- <a name="l00325"></a><a class="code" href="pumax_8c.html#aef9028fc102a39f0faed1ec344a4e9e2">00325</a> Pixmap <a class="code" href="pumax_8c.html#aef9028fc102a39f0faed1ec344a4e9e2">pix</a>;
- <a name="l00326"></a>00326
- <a name="l00327"></a><a class="code" href="pumax_8c.html#a1e80731889ffe5f09aad20a7641c13d0">00327</a> <span class="preprocessor">#define NUMARRAYS 100</span>
- <a name="l00328"></a>00328 <span class="preprocessor"></span>
- <a name="l00329"></a><a class="code" href="struct_array_struct.html">00329</a> <span class="keyword">struct </span><a class="code" href="struct_array_struct.html">ArrayStruct</a>
- <a name="l00330"></a>00330 {
- <a name="l00331"></a><a class="code" href="struct_array_struct.html#ae5bd936d5280e2021bdd3b61f51c31d4">00331</a> <span class="keywordtype">char</span> <a class="code" href="struct_array_struct.html#ae5bd936d5280e2021bdd3b61f51c31d4">Name</a>[80];
- <a name="l00332"></a><a class="code" href="struct_array_struct.html#a38c55a484b3d01e2ffa11f14de2adfd9">00332</a> <span class="keywordtype">float</span> *<a class="code" href="struct_array_struct.html#a38c55a484b3d01e2ffa11f14de2adfd9">Data</a>;
- <a name="l00333"></a><a class="code" href="struct_array_struct.html#a51fc8e81440a7098077d179fca8d63b8">00333</a> <span class="keywordtype">int</span> <a class="code" href="struct_array_struct.html#a51fc8e81440a7098077d179fca8d63b8">DimX</a>;
- <a name="l00334"></a><a class="code" href="struct_array_struct.html#a73fc2a83ee5c78d73b0f4389a0771afb">00334</a> <span class="keywordtype">int</span> <a class="code" href="struct_array_struct.html#a73fc2a83ee5c78d73b0f4389a0771afb">DimY</a>;
- <a name="l00335"></a><a class="code" href="struct_array_struct.html#a53f6572c6d936b07f27d8d6fb9acb915">00335</a> <span class="keywordtype">int</span> <a class="code" href="struct_array_struct.html#a53f6572c6d936b07f27d8d6fb9acb915">DimZ</a>;
- <a name="l00336"></a><a class="code" href="struct_array_struct.html#a00b2e20e7e3b5c5f3cf3e9e6cee16ca3">00336</a> <span class="keywordtype">int</span> <a class="code" href="struct_array_struct.html#a00b2e20e7e3b5c5f3cf3e9e6cee16ca3">Flag</a>;
- <a name="l00337"></a>00337 } <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[<a class="code" href="pumax_8c.html#a1e80731889ffe5f09aad20a7641c13d0">NUMARRAYS</a>];
- <a name="l00338"></a>00338
- <a name="l00339"></a><a class="code" href="pumax_8c.html#a66a0f3add0dee72c7f3811b88249a9b6">00339</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a66a0f3add0dee72c7f3811b88249a9b6">NumArrays</a>;
- <a name="l00340"></a>00340
- <a name="l00341"></a><a class="code" href="struct_win_att_struct.html">00341</a> <span class="keyword">struct </span><a class="code" href="struct_win_att_struct.html">WinAttStruct</a>
- <a name="l00342"></a>00342 {
- <a name="l00343"></a><a class="code" href="struct_win_att_struct.html#aa00d94640c9eb39ceac56f95c595f62a">00343</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct_win_att_struct.html#aa00d94640c9eb39ceac56f95c595f62a">x</a>;
- <a name="l00344"></a><a class="code" href="struct_win_att_struct.html#a770cabf1d350db5890f636ccf30e5d47">00344</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct_win_att_struct.html#a770cabf1d350db5890f636ccf30e5d47">y</a>;
- <a name="l00345"></a><a class="code" href="struct_win_att_struct.html#a6e7f8041c23d41b7d2835a2b855d35f0">00345</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct_win_att_struct.html#a6e7f8041c23d41b7d2835a2b855d35f0">w</a>;
- <a name="l00346"></a><a class="code" href="struct_win_att_struct.html#aa9c1c94dee4ebbe95eb392f738835055">00346</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="struct_win_att_struct.html#aa9c1c94dee4ebbe95eb392f738835055">h</a>;
- <a name="l00347"></a><a class="code" href="struct_win_att_struct.html#abd4485f9d84ad074c80fc4127922cb19">00347</a> <span class="keywordtype">int</span> <a class="code" href="struct_win_att_struct.html#abd4485f9d84ad074c80fc4127922cb19">active</a>;
- <a name="l00348"></a><a class="code" href="struct_win_att_struct.html#a160c20895e7f5cd3463c955778f18338">00348</a> <span class="keywordtype">char</span> <a class="code" href="struct_win_att_struct.html#a160c20895e7f5cd3463c955778f18338">array_name</a>[80];
- <a name="l00349"></a><a class="code" href="struct_win_att_struct.html#ac172f6d90a125507144c20f703b4a0d4">00349</a> <span class="keywordtype">int</span> <a class="code" href="struct_win_att_struct.html#ac172f6d90a125507144c20f703b4a0d4">Plot</a>;
- <a name="l00350"></a><a class="code" href="struct_win_att_struct.html#a75ef0752e759450856fd5967bdb36587">00350</a> <span class="keywordtype">int</span> <a class="code" href="struct_win_att_struct.html#a75ef0752e759450856fd5967bdb36587">Palette</a>;
- <a name="l00351"></a>00351 } <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00352"></a>00352
- <a name="l00353"></a><a class="code" href="pumax_8c.html#a4c676748bf23de0139afe73b216c2bd6">00353</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a4c676748bf23de0139afe73b216c2bd6">BorderWidth</a> = 0;
- <a name="l00354"></a><a class="code" href="pumax_8c.html#a6e0e87f9eb0c26037ddf9147bf56f097">00354</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a6e0e87f9eb0c26037ddf9147bf56f097">WM_top_area</a> = 0; <span class="comment">// Window manager top area</span>
- <a name="l00355"></a><a class="code" href="pumax_8c.html#a0a8a8622ae71c04112e4e0d9ccda7817">00355</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a0a8a8622ae71c04112e4e0d9ccda7817">WinLM</a> = 0;
- <a name="l00356"></a><a class="code" href="pumax_8c.html#a261f1b75cb979500af635c616e19771d">00356</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a261f1b75cb979500af635c616e19771d">WinRM</a> = 0;
- <a name="l00357"></a><a class="code" href="pumax_8c.html#a6529bd28fe04607bb7d71ff00a101e52">00357</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a6529bd28fe04607bb7d71ff00a101e52">WinTM</a> = 24;
- <a name="l00358"></a><a class="code" href="pumax_8c.html#ad6e080222bafe5cdc477c0a8ae13d144">00358</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ad6e080222bafe5cdc477c0a8ae13d144">WinBM</a> = 0;
- <a name="l00359"></a>00359
- <a name="l00360"></a><a class="code" href="struct_color_strip.html">00360</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a>
- <a name="l00361"></a>00361 {
- <a name="l00362"></a><a class="code" href="struct_color_strip.html#a4f6280212828381ae297b3f9565e7ce8">00362</a> <span class="keywordtype">double</span> <a class="code" href="struct_color_strip.html#a4f6280212828381ae297b3f9565e7ce8">Lo</a>;
- <a name="l00363"></a><a class="code" href="struct_color_strip.html#a6deff3a5a5614df503a3af930233730b">00363</a> <span class="keywordtype">double</span> <a class="code" href="struct_color_strip.html#a6deff3a5a5614df503a3af930233730b">Hi</a>;
- <a name="l00364"></a><a class="code" href="struct_color_strip.html#a8be72b425d4dae5555815f0108a2a2b9">00364</a> <span class="keywordtype">char</span> *<a class="code" href="struct_color_strip.html#a8be72b425d4dae5555815f0108a2a2b9">Name</a>;
- <a name="l00365"></a><a class="code" href="struct_color_strip.html#ab1a6137a580d2a1817f4d8e127d4743c">00365</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="struct_color_strip.html#ab1a6137a580d2a1817f4d8e127d4743c">pixel</a>;
- <a name="l00366"></a>00366 };
- <a name="l00367"></a>00367
- <a name="l00368"></a><a class="code" href="pumax_8c.html#a7f2aa7d59c57b8054e230e2f72564671">00368</a> <span class="preprocessor">#define AUTOCOLORS 14</span>
- <a name="l00369"></a><a class="code" href="pumax_8c.html#a0f1e694b411614c27c69b2b2ac6d293d">00369</a> <span class="preprocessor"></span><span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#a0f1e694b411614c27c69b2b2ac6d293d">Autostrip</a>[<a class="code" href="pumax_8c.html#a7f2aa7d59c57b8054e230e2f72564671">AUTOCOLORS</a>+1] =
- <a name="l00370"></a>00370 {
- <a name="l00371"></a>00371 {0.0,0.0,<span class="stringliteral">"red"</span>},
- <a name="l00372"></a>00372 {0.0,0.0,<span class="stringliteral">"OrangeRed"</span>},
- <a name="l00373"></a>00373 {0.0,0.0,<span class="stringliteral">"Orange"</span>},
- <a name="l00374"></a>00374 {0.0,0.0,<span class="stringliteral">"yellow"</span>},
- <a name="l00375"></a>00375 {0.0,0.0,<span class="stringliteral">"GreenYellow"</span>},
- <a name="l00376"></a>00376 {0.0,0.0,<span class="stringliteral">"green"</span>},
- <a name="l00377"></a>00377 {0.0,0.0,<span class="stringliteral">"aquamarine"</span>},
- <a name="l00378"></a>00378 {0.0,0.0,<span class="stringliteral">"cyan"</span>},
- <a name="l00379"></a>00379 {0.0,0.0,<span class="stringliteral">"SkyBlue"</span>},
- <a name="l00380"></a>00380 {0.0,0.0,<span class="stringliteral">"blue"</span>},
- <a name="l00381"></a>00381 {0.0,0.0,<span class="stringliteral">"orchid"</span>},
- <a name="l00382"></a>00382 {0.0,0.0,<span class="stringliteral">"magenta"</span>},
- <a name="l00383"></a>00383 {0.0,0.0,<span class="stringliteral">"violet"</span>},
- <a name="l00384"></a>00384 {0.0,0.0,<span class="stringliteral">"DarkViolet"</span>},
- <a name="l00385"></a>00385 {0.0,0.0,NULL}
- <a name="l00386"></a>00386 };
- <a name="l00387"></a>00387
- <a name="l00388"></a><a class="code" href="pumax_8c.html#a27585cbf21e1ba9c7dd6ddc80b53a483">00388</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#a27585cbf21e1ba9c7dd6ddc80b53a483">Ustrip</a>[] =
- <a name="l00389"></a>00389 {
- <a name="l00390"></a>00390 {-99.0,-10.0,<span class="stringliteral">"red"</span>},
- <a name="l00391"></a>00391 {-10.0, -5.0,<span class="stringliteral">"OrangeRed"</span>},
- <a name="l00392"></a>00392 { -5.0, 0.0,<span class="stringliteral">"Orange"</span>},
- <a name="l00393"></a>00393 { 0.0, 5.0,<span class="stringliteral">"yellow"</span>},
- <a name="l00394"></a>00394 { 5.0, 10.0,<span class="stringliteral">"GreenYellow"</span>},
- <a name="l00395"></a>00395 { 10.0, 15.0,<span class="stringliteral">"green"</span>},
- <a name="l00396"></a>00396 { 15.0, 20.0,<span class="stringliteral">"aquamarine"</span>},
- <a name="l00397"></a>00397 { 20.0, 25.0,<span class="stringliteral">"cyan"</span>},
- <a name="l00398"></a>00398 { 25.0, 30.0,<span class="stringliteral">"SkyBlue"</span>},
- <a name="l00399"></a>00399 { 30.0, 35.0,<span class="stringliteral">"blue"</span>},
- <a name="l00400"></a>00400 { 35.0, 40.0,<span class="stringliteral">"orchid"</span>},
- <a name="l00401"></a>00401 { 40.0, 45.0,<span class="stringliteral">"magenta"</span>},
- <a name="l00402"></a>00402 { 45.0, 50.0,<span class="stringliteral">"violet"</span>},
- <a name="l00403"></a>00403 { 50.0, 99.0,<span class="stringliteral">"DarkViolet"</span>},
- <a name="l00404"></a>00404 { 0.0, 0.0,NULL}
- <a name="l00405"></a>00405 };
- <a name="l00406"></a>00406
- <a name="l00407"></a><a class="code" href="pumax_8c.html#a8ca74da35be1e45958cd987830c0ac4a">00407</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#a8ca74da35be1e45958cd987830c0ac4a">Qstrip</a>[] =
- <a name="l00408"></a>00408 {
- <a name="l00409"></a>00409 {-99.0, 0.0,<span class="stringliteral">"black"</span>},
- <a name="l00410"></a>00410 { 0.0, 5.0,<span class="stringliteral">"OrangeRed"</span>},
- <a name="l00411"></a>00411 { 5.0, 10.0,<span class="stringliteral">"Orange"</span>},
- <a name="l00412"></a>00412 { 10.0, 15.0,<span class="stringliteral">"yellow"</span>},
- <a name="l00413"></a>00413 { 15.0, 20.0,<span class="stringliteral">"GreenYellow"</span>},
- <a name="l00414"></a>00414 { 20.0, 25.0,<span class="stringliteral">"green"</span>},
- <a name="l00415"></a>00415 { 25.0, 30.0,<span class="stringliteral">"aquamarine"</span>},
- <a name="l00416"></a>00416 { 30.0, 35.0,<span class="stringliteral">"cyan"</span>},
- <a name="l00417"></a>00417 { 35.0, 40.0,<span class="stringliteral">"SkyBlue"</span>},
- <a name="l00418"></a>00418 { 40.0, 45.0,<span class="stringliteral">"blue"</span>},
- <a name="l00419"></a>00419 { 45.0, 50.0,<span class="stringliteral">"orchid"</span>},
- <a name="l00420"></a>00420 { 50.0, 55.0,<span class="stringliteral">"magenta"</span>},
- <a name="l00421"></a>00421 { 55.0, 60.0,<span class="stringliteral">"violet"</span>},
- <a name="l00422"></a>00422 { 60.0, 99.0,<span class="stringliteral">"DarkViolet"</span>},
- <a name="l00423"></a>00423 { 0.0, 0.0,NULL}
- <a name="l00424"></a>00424 };
- <a name="l00425"></a>00425
- <a name="l00426"></a><a class="code" href="pumax_8c.html#af20e4f75be17c991b9279e16d31b2f63">00426</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#af20e4f75be17c991b9279e16d31b2f63">Vstrip</a>[] =
- <a name="l00427"></a>00427 {
- <a name="l00428"></a>00428 {-99.0,-10.0,<span class="stringliteral">"brown"</span>},
- <a name="l00429"></a>00429 {-10.0, -8.0,<span class="stringliteral">"gold"</span>},
- <a name="l00430"></a>00430 { -8.0, -6.0,<span class="stringliteral">"purple"</span>},
- <a name="l00431"></a>00431 { -6.0, -4.0,<span class="stringliteral">"red"</span>},
- <a name="l00432"></a>00432 { -4.0, -2.0,<span class="stringliteral">"OrangeRed"</span>},
- <a name="l00433"></a>00433 { -2.0, 0.0,<span class="stringliteral">"Orange"</span>},
- <a name="l00434"></a>00434 { 0.0, 2.0,<span class="stringliteral">"yellow"</span>},
- <a name="l00435"></a>00435 { 2.0, 4.0,<span class="stringliteral">"GreenYellow"</span>},
- <a name="l00436"></a>00436 { 4.0, 6.0,<span class="stringliteral">"green"</span>},
- <a name="l00437"></a>00437 { 6.0, 8.0,<span class="stringliteral">"aquamarine"</span>},
- <a name="l00438"></a>00438 { 8.0, 10.0,<span class="stringliteral">"cyan"</span>},
- <a name="l00439"></a>00439 { 10.0, 99.0,<span class="stringliteral">"blue"</span>},
- <a name="l00440"></a>00440 { 0.0, 0.0,NULL}
- <a name="l00441"></a>00441 };
- <a name="l00442"></a>00442
- <a name="l00443"></a><a class="code" href="pumax_8c.html#a2f27d898c032b44d43e48cbf16abcbc9">00443</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#a2f27d898c032b44d43e48cbf16abcbc9">Tstrip</a>[] =
- <a name="l00444"></a>00444 {
- <a name="l00445"></a>00445 {-99.0,-50.0,<span class="stringliteral">"MidnightBlue"</span>},
- <a name="l00446"></a>00446 {-50.0,-40.0,<span class="stringliteral">"RoyalBlue4"</span>},
- <a name="l00447"></a>00447 {-40.0,-30.0,<span class="stringliteral">"RoyalBlue3"</span>},
- <a name="l00448"></a>00448 {-30.0,-20.0,<span class="stringliteral">"RoyalBlue2"</span>},
- <a name="l00449"></a>00449 {-20.0,-10.0,<span class="stringliteral">"RoyalBlue1"</span>},
- <a name="l00450"></a>00450 {-10.0, 0.0,<span class="stringliteral">"violet"</span>},
- <a name="l00451"></a>00451 { 0.0, 10.0,<span class="stringliteral">"IndianRed1"</span>},
- <a name="l00452"></a>00452 { 10.0, 20.0,<span class="stringliteral">"IndianRed2"</span>},
- <a name="l00453"></a>00453 { 20.0, 30.0,<span class="stringliteral">"IndianRed3"</span>},
- <a name="l00454"></a>00454 { 30.0, 40.0,<span class="stringliteral">"IndianRed4"</span>},
- <a name="l00455"></a>00455 { 40.0, 50.0,<span class="stringliteral">"red"</span>},
- <a name="l00456"></a>00456 { 0.0, 0.0,NULL}
- <a name="l00457"></a>00457 };
- <a name="l00458"></a>00458
- <a name="l00459"></a><a class="code" href="pumax_8c.html#a0704c1182f72d321dd1b94c8bfa4ea2d">00459</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#a0704c1182f72d321dd1b94c8bfa4ea2d">Kstrip</a>[] =
- <a name="l00460"></a>00460 {
- <a name="l00461"></a>00461 {100.0,210.0,<span class="stringliteral">"RoyalBlue4"</span>},
- <a name="l00462"></a>00462 {210.0,220.0,<span class="stringliteral">"RoyalBlue3"</span>},
- <a name="l00463"></a>00463 {220.0,230.0,<span class="stringliteral">"RoyalBlue2"</span>},
- <a name="l00464"></a>00464 {230.0,240.0,<span class="stringliteral">"RoyalBlue1"</span>},
- <a name="l00465"></a>00465 {240.0,250.0,<span class="stringliteral">"violet"</span>},
- <a name="l00466"></a>00466 {250.0,260.0,<span class="stringliteral">"IndianRed1"</span>},
- <a name="l00467"></a>00467 {260.0,270.0,<span class="stringliteral">"IndianRed2"</span>},
- <a name="l00468"></a>00468 {270.0,280.0,<span class="stringliteral">"IndianRed3"</span>},
- <a name="l00469"></a>00469 {280.0,290.0,<span class="stringliteral">"IndianRed4"</span>},
- <a name="l00470"></a>00470 {290.0,400.0,<span class="stringliteral">"red"</span>},
- <a name="l00471"></a>00471 { 0.0, 0.0,NULL}
- <a name="l00472"></a>00472 };
- <a name="l00473"></a>00473
- <a name="l00474"></a><a class="code" href="pumax_8c.html#acb534c740918af3e4435f39fd13430c2">00474</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#acb534c740918af3e4435f39fd13430c2">Pstrip</a>[] =
- <a name="l00475"></a>00475 {
- <a name="l00476"></a>00476 { 00.0, 985.0,<span class="stringliteral">"RoyalBlue4"</span>},
- <a name="l00477"></a>00477 { 985.0, 990.0,<span class="stringliteral">"RoyalBlue3"</span>},
- <a name="l00478"></a>00478 { 990.0, 995.0,<span class="stringliteral">"RoyalBlue2"</span>},
- <a name="l00479"></a>00479 { 995.0,1000.0,<span class="stringliteral">"RoyalBlue1"</span>},
- <a name="l00480"></a>00480 {1000.0,1005.0,<span class="stringliteral">"violet"</span>},
- <a name="l00481"></a>00481 {1005.0,1010.0,<span class="stringliteral">"IndianRed1"</span>},
- <a name="l00482"></a>00482 {1010.0,1015.0,<span class="stringliteral">"IndianRed2"</span>},
- <a name="l00483"></a>00483 {1015.0,1020.0,<span class="stringliteral">"IndianRed3"</span>},
- <a name="l00484"></a>00484 {1020.0,1025.0,<span class="stringliteral">"IndianRed4"</span>},
- <a name="l00485"></a>00485 {1025.0,9990.0,<span class="stringliteral">"red"</span>},
- <a name="l00486"></a>00486 { 0.0, 0.0,NULL}
- <a name="l00487"></a>00487 };
- <a name="l00488"></a>00488
- <a name="l00489"></a><a class="code" href="pumax_8c.html#a61c5742f58c9f2060723b084e1b07877">00489</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#a61c5742f58c9f2060723b084e1b07877">MarsTStrip</a>[] =
- <a name="l00490"></a>00490 {
- <a name="l00491"></a>00491 {-200.0,-90.0,<span class="stringliteral">"RoyalBlue4"</span>},
- <a name="l00492"></a>00492 { -90.0,-80.0,<span class="stringliteral">"RoyalBlue3"</span>},
- <a name="l00493"></a>00493 { -80.0,-70.0,<span class="stringliteral">"RoyalBlue2"</span>},
- <a name="l00494"></a>00494 { -70.0,-60.0,<span class="stringliteral">"RoyalBlue1"</span>},
- <a name="l00495"></a>00495 { -60.0,-50.0,<span class="stringliteral">"violet"</span>},
- <a name="l00496"></a>00496 { -50.0,-40.0,<span class="stringliteral">"IndianRed1"</span>},
- <a name="l00497"></a>00497 { -40.0,-30.0,<span class="stringliteral">"IndianRed2"</span>},
- <a name="l00498"></a>00498 { -30.0,-20.0,<span class="stringliteral">"IndianRed3"</span>},
- <a name="l00499"></a>00499 { -20.0, 0.0,<span class="stringliteral">"IndianRed4"</span>},
- <a name="l00500"></a>00500 { 0.0,100.0,<span class="stringliteral">"red"</span>},
- <a name="l00501"></a>00501 { 0.0, 0.0,NULL}
- <a name="l00502"></a>00502 };
- <a name="l00503"></a>00503
- <a name="l00504"></a><a class="code" href="pumax_8c.html#a8b073841e9a0dd00c1ccefa59fa89ca2">00504</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#a8b073841e9a0dd00c1ccefa59fa89ca2">AmpliStrip</a>[] =
- <a name="l00505"></a>00505 {
- <a name="l00506"></a>00506 { 0.0, 1.0,<span class="stringliteral">"DarkBlue"</span>},
- <a name="l00507"></a>00507 { 8.0, 9.0,<span class="stringliteral">"blue"</span>},
- <a name="l00508"></a>00508 { 8.0, 9.0,<span class="stringliteral">"DarkGreen"</span>},
- <a name="l00509"></a>00509 { 8.0, 9.0,<span class="stringliteral">"green"</span>},
- <a name="l00510"></a>00510 { 8.0, 9.0,<span class="stringliteral">"yellow"</span>},
- <a name="l00511"></a>00511 { 9.0, 10.0,<span class="stringliteral">"Orange"</span>},
- <a name="l00512"></a>00512 { 10.0, 11.0,<span class="stringliteral">"OrangeRed"</span>},
- <a name="l00513"></a>00513 { 11.0, 12.0,<span class="stringliteral">"red"</span>},
- <a name="l00514"></a>00514 { 0.0, 0.0,NULL}
- <a name="l00515"></a>00515 };
- <a name="l00516"></a>00516
- <a name="l00517"></a><a class="code" href="pumax_8c.html#a72a78f98da890d213dc68dbc61ea6a64">00517</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#a72a78f98da890d213dc68dbc61ea6a64">Vegstrip</a>[] =
- <a name="l00518"></a>00518 {
- <a name="l00519"></a>00519 {-999.9,0.001,<span class="stringliteral">"DarkBlue"</span>},
- <a name="l00520"></a>00520 { 0.001, 10.0,<span class="stringliteral">"brown"</span>},
- <a name="l00521"></a>00521 { 10.0, 20.0,<span class="stringliteral">"SeaGreen4"</span>},
- <a name="l00522"></a>00522 { 20.0, 30.0,<span class="stringliteral">"SeaGreen3"</span>},
- <a name="l00523"></a>00523 { 30.0, 40.0,<span class="stringliteral">"SeaGreen2"</span>},
- <a name="l00524"></a>00524 { 40.0, 50.0,<span class="stringliteral">"SeaGreen1"</span>},
- <a name="l00525"></a>00525 { 50.0, 60.0,<span class="stringliteral">"YellowGreen"</span>},
- <a name="l00526"></a>00526 { 60.0, 70.0,<span class="stringliteral">"green4"</span>},
- <a name="l00527"></a>00527 { 70.0, 80.0,<span class="stringliteral">"green3"</span>},
- <a name="l00528"></a>00528 { 80.0, 90.0,<span class="stringliteral">"green2"</span>},
- <a name="l00529"></a>00529 { 90.0,999.0,<span class="stringliteral">"green1"</span>},
- <a name="l00530"></a>00530 { 0.0, 0.0,NULL}
- <a name="l00531"></a>00531 };
- <a name="l00532"></a>00532
- <a name="l00533"></a><a class="code" href="pumax_8c.html#ad8ac7fab8931a9e76a31db92b88002e6">00533</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#ad8ac7fab8931a9e76a31db92b88002e6">Tstripoce</a>[] =
- <a name="l00534"></a>00534 {
- <a name="l00535"></a>00535 {-99.0, 0.00001,<span class="stringliteral">"Black"</span>},
- <a name="l00536"></a>00536 { 0.00001, 4.0 ,<span class="stringliteral">"RoyalBlue4"</span>},
- <a name="l00537"></a>00537 { 4.0 ,8.0,<span class="stringliteral">"RoyalBlue3"</span>},
- <a name="l00538"></a>00538 { 8.0, 12.0,<span class="stringliteral">"RoyalBlue2"</span>},
- <a name="l00539"></a>00539 { 12.0, 16.0,<span class="stringliteral">"RoyalBlue1"</span>},
- <a name="l00540"></a>00540 { 16.0, 20.0,<span class="stringliteral">"violet"</span>},
- <a name="l00541"></a>00541 { 20.0, 24.0,<span class="stringliteral">"IndianRed1"</span>},
- <a name="l00542"></a>00542 { 24.0, 28.0,<span class="stringliteral">"IndianRed2"</span>},
- <a name="l00543"></a>00543 { 28.0, 32.0,<span class="stringliteral">"IndianRed3"</span>},
- <a name="l00544"></a>00544 { 32.0, 36.0,<span class="stringliteral">"IndianRed4"</span>},
- <a name="l00545"></a>00545 { 36.0, 40.0,<span class="stringliteral">"red"</span>},
- <a name="l00546"></a>00546 { 0.0, 0.0,NULL}
- <a name="l00547"></a>00547 };
- <a name="l00548"></a>00548
- <a name="l00549"></a><a class="code" href="pumax_8c.html#ac548e93acae78e8960939467fa588661">00549</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#ac548e93acae78e8960939467fa588661">Sstripoce</a>[] =
- <a name="l00550"></a>00550 {
- <a name="l00551"></a>00551 {-99.0, 30.0,<span class="stringliteral">"Black"</span>},
- <a name="l00552"></a>00552 { 30.0, 32.0 ,<span class="stringliteral">"RoyalBlue4"</span>},
- <a name="l00553"></a>00553 { 32.0 ,32.5,<span class="stringliteral">"RoyalBlue3"</span>},
- <a name="l00554"></a>00554 { 32.5, 33.0,<span class="stringliteral">"RoyalBlue2"</span>},
- <a name="l00555"></a>00555 { 33.0, 34.0,<span class="stringliteral">"SeaGreen"</span>},
- <a name="l00556"></a>00556 { 34.0, 34.5,<span class="stringliteral">"YellowGreen"</span>},
- <a name="l00557"></a>00557 { 34.5, 35.0,<span class="stringliteral">"LightGreen"</span>},
- <a name="l00558"></a>00558 { 35.0, 35.5,<span class="stringliteral">"Orange"</span>},
- <a name="l00559"></a>00559 { 35.5, 36.0,<span class="stringliteral">"DarkOrange"</span>},
- <a name="l00560"></a>00560 { 36.0, 36.5,<span class="stringliteral">"OrangeRed"</span>},
- <a name="l00561"></a>00561 { 36.5, 40.0,<span class="stringliteral">"red"</span>},
- <a name="l00562"></a>00562 { 0.0, 0.0,NULL}
- <a name="l00563"></a>00563 };
- <a name="l00564"></a>00564
- <a name="l00565"></a><a class="code" href="pumax_8c.html#a796ee9592284d3821ad745832918f043">00565</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#a796ee9592284d3821ad745832918f043">DCCstrip</a>[] =
- <a name="l00566"></a>00566 {
- <a name="l00567"></a>00567 {-99.0, 0.0, <span class="stringliteral">"Black"</span>},
- <a name="l00568"></a>00568 { 0.0, 10.0,<span class="stringliteral">"Yellow"</span>},
- <a name="l00569"></a>00569 { 10.0, 20.0,<span class="stringliteral">"YellowGreen"</span>},
- <a name="l00570"></a>00570 { 20.0, 30.0,<span class="stringliteral">"Green"</span>},
- <a name="l00571"></a>00571 { 30.0, 40.0,<span class="stringliteral">"Aquamarine"</span>},
- <a name="l00572"></a>00572 { 40.0, 50.0,<span class="stringliteral">"Cyan"</span>},
- <a name="l00573"></a>00573 { 50.0, 60.0,<span class="stringliteral">"SkyBlue"</span>},
- <a name="l00574"></a>00574 { 60.0, 70.0,<span class="stringliteral">"Blue"</span>},
- <a name="l00575"></a>00575 { 70.0, 80.0,<span class="stringliteral">"Orchid"</span>},
- <a name="l00576"></a>00576 { 80.0, 90.0,<span class="stringliteral">"Magenta"</span>},
- <a name="l00577"></a>00577 { 90.0,100.0,<span class="stringliteral">"DarkViolet"</span>},
- <a name="l00578"></a>00578 { 0.0, 0.0,NULL}
- <a name="l00579"></a>00579 };
- <a name="l00580"></a>00580
- <a name="l00581"></a><a class="code" href="pumax_8c.html#a2febc58f0aace3cfbc435e59a810f343">00581</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> <a class="code" href="pumax_8c.html#a2febc58f0aace3cfbc435e59a810f343">DTDTstrip</a>[] =
- <a name="l00582"></a>00582 {
- <a name="l00583"></a>00583 {-99.0, -5.0,<span class="stringliteral">"brown"</span>},
- <a name="l00584"></a>00584 {- 5.0, -3.0,<span class="stringliteral">"gold"</span>},
- <a name="l00585"></a>00585 { -3.0, -1.5,<span class="stringliteral">"purple"</span>},
- <a name="l00586"></a>00586 { -1.5, -0.5,<span class="stringliteral">"red"</span>},
- <a name="l00587"></a>00587 { -0.5, -0.25,<span class="stringliteral">"OrangeRed"</span>},
- <a name="l00588"></a>00588 { -0.25, 0.0,<span class="stringliteral">"Orange"</span>},
- <a name="l00589"></a>00589 { 0.0, 0.25,<span class="stringliteral">"yellow"</span>},
- <a name="l00590"></a>00590 { 0.25, 0.5,<span class="stringliteral">"GreenYellow"</span>},
- <a name="l00591"></a>00591 { 0.5, 1.5,<span class="stringliteral">"green"</span>},
- <a name="l00592"></a>00592 { 1.5, 3.0,<span class="stringliteral">"aquamarine"</span>},
- <a name="l00593"></a>00593 { 3.0, 5.0,<span class="stringliteral">"cyan"</span>},
- <a name="l00594"></a>00594 { 5.0, 99.0,<span class="stringliteral">"blue"</span>},
- <a name="l00595"></a>00595 { 0.0, 0.0,NULL}
- <a name="l00596"></a>00596 };
- <a name="l00597"></a>00597
- <a name="l00598"></a><a class="code" href="pumax_8c.html#a9923377bd967d1dd49eb98f009f48fc2">00598</a> <span class="preprocessor">#define AMPLI_COLS 8</span>
- <a name="l00599"></a>00599 <span class="preprocessor"></span>
- <a name="l00600"></a><a class="code" href="pumax_8c.html#a941db650b22be955b532e96aec71f302">00600</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> *<a class="code" href="pumax_8c.html#a941db650b22be955b532e96aec71f302">Cstrip</a>;
- <a name="l00601"></a><a class="code" href="pumax_8c.html#a957b943624576ae3caec966e58c93bcb">00601</a> <span class="keyword">struct </span><a class="code" href="struct_color_strip.html">ColorStrip</a> *<a class="code" href="pumax_8c.html#a957b943624576ae3caec966e58c93bcb">Pallet</a>[<a class="code" href="pumax_8c.html#afa68e13002f97f4041b7acca426be273">NUMPAL</a>] =
- <a name="l00602"></a>00602 { <a class="code" href="pumax_8c.html#a0f1e694b411614c27c69b2b2ac6d293d">Autostrip</a>, <a class="code" href="pumax_8c.html#a27585cbf21e1ba9c7dd6ddc80b53a483">Ustrip</a>, <a class="code" href="pumax_8c.html#af20e4f75be17c991b9279e16d31b2f63">Vstrip</a>, <a class="code" href="pumax_8c.html#a2f27d898c032b44d43e48cbf16abcbc9">Tstrip</a>, <a class="code" href="pumax_8c.html#acb534c740918af3e4435f39fd13430c2">Pstrip</a>, <a class="code" href="pumax_8c.html#a8ca74da35be1e45958cd987830c0ac4a">Qstrip</a>,<a class="code" href="pumax_8c.html#a61c5742f58c9f2060723b084e1b07877">MarsTStrip</a>,<a class="code" href="pumax_8c.html#a8b073841e9a0dd00c1ccefa59fa89ca2">AmpliStrip</a>,
- <a name="l00603"></a>00603 <a class="code" href="pumax_8c.html#a72a78f98da890d213dc68dbc61ea6a64">Vegstrip</a>, <a class="code" href="pumax_8c.html#ad8ac7fab8931a9e76a31db92b88002e6">Tstripoce</a>, <a class="code" href="pumax_8c.html#ac548e93acae78e8960939467fa588661">Sstripoce</a>, <a class="code" href="pumax_8c.html#a796ee9592284d3821ad745832918f043">DCCstrip</a>, DTDTstrip};
- <a name="l00604"></a>00604
- <a name="l00605"></a><a class="code" href="pumax_8c.html#a9cfdd6ecc7e3c280b527a92ac5cd7ca7">00605</a> <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> <a class="code" href="pumax_8c.html#a9cfdd6ecc7e3c280b527a92ac5cd7ca7">VGAX</a>;
- <a name="l00606"></a><a class="code" href="pumax_8c.html#ae3ac2c1b41630a01b6493fe81976e943">00606</a> <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> <a class="code" href="pumax_8c.html#ae3ac2c1b41630a01b6493fe81976e943">VGAY</a>;
- <a name="l00607"></a><a class="code" href="pumax_8c.html#a4817685b1110531f0435da18eeff0be5">00607</a> <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> <a class="code" href="pumax_8c.html#a4817685b1110531f0435da18eeff0be5">CurVal</a>;
- <a name="l00608"></a>00608
- <a name="l00609"></a><a class="code" href="pumax_8c.html#a253b4cae7d3fe7a244b1bb3163e268f3">00609</a> <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *<a class="code" href="pumax_8c.html#a253b4cae7d3fe7a244b1bb3163e268f3">Field</a>; <span class="comment">// Pointer for ISO data</span>
- <a name="l00610"></a><a class="code" href="pumax_8c.html#a1d152e4b0e46de1be87e6e9cc20786b8">00610</a> <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *<a class="code" href="pumax_8c.html#a1d152e4b0e46de1be87e6e9cc20786b8">Ampli</a>; <span class="comment">// Amplitudes of spherical harmonics</span>
- <a name="l00611"></a><a class="code" href="pumax_8c.html#a29357c1e810ce4a700215ae4c7d1d32c">00611</a> XColor *<a class="code" href="pumax_8c.html#a29357c1e810ce4a700215ae4c7d1d32c">Acol</a>; <span class="comment">// Amplitude colors</span>
- <a name="l00612"></a>00612
- <a name="l00613"></a><a class="code" href="pumax_8c.html#af611adb2a277a44b745300318b0bbca7">00613</a> Colormap <a class="code" href="pumax_8c.html#af611adb2a277a44b745300318b0bbca7">colormap</a>;
- <a name="l00614"></a>00614
- <a name="l00615"></a><a class="code" href="pumax_8c.html#a4cd38c53dcf67c955c7cb4e4d35c0423">00615</a> XColor <a class="code" href="pumax_8c.html#a9977d5ab51b6b525c34f9730753798e0">xcolor1</a>,<a class="code" href="pumax_8c.html#a4cd38c53dcf67c955c7cb4e4d35c0423">xcolor2</a>;
- <a name="l00616"></a><a class="code" href="pumax_8c.html#ae93341fafb2771148f17d93c497b3c00">00616</a> XColor <a class="code" href="pumax_8c.html#a01ebcf2a9475e4c321c9a058fe8c543d">Red</a>,<a class="code" href="pumax_8c.html#a5e170cf7540a4c589c138de6a965f05c">Green</a>,<a class="code" href="pumax_8c.html#a54b60e65282d0941b27d3ad598e7ab59">Blue</a>,<a class="code" href="pumax_8c.html#ae93341fafb2771148f17d93c497b3c00">Yellow</a>,<a class="code" href="pumax_8c.html#a800d1cf0ab761999a9e79658b43f172d">Grey</a>,<a class="code" href="pumax_8c.html#a26e22176df9bc06f072235370bf1fcf4">LightRed</a>,<a class="code" href="pumax_8c.html#a8ac22720ee6aa8d3c19cc97378edaefc">DarkRed</a>,<a class="code" href="pumax_8c.html#a6d285575579377fd53ba45ac7626f205">LightBlue</a>,<a class="code" href="pumax_8c.html#a5e2773a5f9e3b633c7042f9df0efa1f6">DarkBlue</a>;
- <a name="l00617"></a><a class="code" href="pumax_8c.html#aea97d46f0f314ab5b525ec1fbc9c1def">00617</a> XColor <a class="code" href="pumax_8c.html#aea97d46f0f314ab5b525ec1fbc9c1def">LightGreen</a>,<a class="code" href="pumax_8c.html#ac1bc479b8911f954e0e0b3e1d96a8522">DarkGreen</a>,<a class="code" href="pumax_8c.html#a7895c2ac3b97db386425062372fce47d">Dummy</a>;
- <a name="l00618"></a>00618
- <a name="l00619"></a><a class="code" href="pumax_8c.html#acf42c004dc25d02b8fbebedd80dc4f2f">00619</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="pumax_8c.html#acf42c004dc25d02b8fbebedd80dc4f2f">TSColor</a>[10];
- <a name="l00620"></a>00620
- <a name="l00621"></a><a class="code" href="pumax_8c.html#a2669b7d23901c3e648c09854eaf7f76b">00621</a> Window <a class="code" href="pumax_8c.html#a2669b7d23901c3e648c09854eaf7f76b">Win</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00622"></a><a class="code" href="pumax_8c.html#a7fee7b546595edcbee920757b6309386">00622</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a7fee7b546595edcbee920757b6309386">win</a>; <span class="comment">// Current window</span>
- <a name="l00623"></a><a class="code" href="pumax_8c.html#a1e058dabe463a89f604e7f19a4ddf5cd">00623</a> Window <a class="code" href="pumax_8c.html#a1e058dabe463a89f604e7f19a4ddf5cd">Cow</a>; <span class="comment">// Control bar</span>
- <a name="l00624"></a><a class="code" href="pumax_8c.html#adf21c8071c5e14213efcbc3d72603d48">00624</a> Window <a class="code" href="pumax_8c.html#adf21c8071c5e14213efcbc3d72603d48">HelpWindow</a>;
- <a name="l00625"></a>00625
- <a name="l00626"></a><a class="code" href="pumax_8c.html#a830a1a64cb3097b140a98693d01c0405">00626</a> XTextProperty <a class="code" href="pumax_8c.html#a830a1a64cb3097b140a98693d01c0405">WinconName1</a>;
- <a name="l00627"></a><a class="code" href="pumax_8c.html#a034886863bf83e00a54498e1d23cb649">00627</a> XTextProperty <a class="code" href="pumax_8c.html#a034886863bf83e00a54498e1d23cb649">WinconName3</a>;
- <a name="l00628"></a><a class="code" href="pumax_8c.html#ac5f61b0d40d9b7524a29a685237bc904">00628</a> XTextProperty <a class="code" href="pumax_8c.html#ac5f61b0d40d9b7524a29a685237bc904">WinconPause</a>;
- <a name="l00629"></a><a class="code" href="pumax_8c.html#a7cbe9b70caa0883bd8a7484d05b4b424">00629</a> XTextProperty <a class="code" href="pumax_8c.html#a7cbe9b70caa0883bd8a7484d05b4b424">WinconReady</a>;
- <a name="l00630"></a><a class="code" href="pumax_8c.html#aea37ddc265c96d0c341776b4698adeda">00630</a> <span class="keywordtype">char</span> *<a class="code" href="pumax_8c.html#aea37ddc265c96d0c341776b4698adeda">PauseTitle</a> = <span class="stringliteral">"Run Paused"</span>;
- <a name="l00631"></a><a class="code" href="pumax_8c.html#a686301f669ae0f44f8790dea2fc370e5">00631</a> <span class="keywordtype">char</span> *<a class="code" href="pumax_8c.html#a686301f669ae0f44f8790dea2fc370e5">ReadyTitle</a> = <span class="stringliteral">"Press Start Button"</span>;
- <a name="l00632"></a>00632
- <a name="l00633"></a><a class="code" href="pumax_8c.html#a8f4018ac7749f8733a95a2e6b6b4b819">00633</a> XEvent <a class="code" href="pumax_8c.html#a8f4018ac7749f8733a95a2e6b6b4b819">CowEvent</a>;
- <a name="l00634"></a>00634
- <a name="l00635"></a><a class="code" href="pumax_8c.html#a9f8ad3761358fcb0f2e58fc6d01ac74e">00635</a> XSizeHints <a class="code" href="pumax_8c.html#a9f8ad3761358fcb0f2e58fc6d01ac74e">WinSizeHints</a>;
- <a name="l00636"></a><a class="code" href="pumax_8c.html#a9a536c9388aa6ac3cbcd5f0e681d9b3c">00636</a> XSizeHints <a class="code" href="pumax_8c.html#a9a536c9388aa6ac3cbcd5f0e681d9b3c">CowSizeHints</a>;
- <a name="l00637"></a><a class="code" href="pumax_8c.html#a12d6ffc3e8f2d7e02bbb025dc43fc949">00637</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#aba7235fa49c4a6ebf34f22010faa886b">OutXSize</a>,<a class="code" href="pumax_8c.html#a12d6ffc3e8f2d7e02bbb025dc43fc949">OutYSize</a>;
- <a name="l00638"></a><a class="code" href="pumax_8c.html#ad43c3812e6d13e0518d9f8b8f463ffcf">00638</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ad43c3812e6d13e0518d9f8b8f463ffcf">count</a>;
- <a name="l00639"></a><a class="code" href="pumax_8c.html#ac73c09c91b4a7000137bd1950f25ece6">00639</a> XEvent <a class="code" href="pumax_8c.html#ac73c09c91b4a7000137bd1950f25ece6">report</a>;
- <a name="l00640"></a><a class="code" href="pumax_8c.html#a5da9d24666f1955a9b5ce3d2583b823a">00640</a> GC <a class="code" href="pumax_8c.html#a5da9d24666f1955a9b5ce3d2583b823a">gc</a>;
- <a name="l00641"></a>00641
- <a name="l00642"></a>00642 <span class="comment">/*</span>
- <a name="l00643"></a>00643 <span class="comment">char BigFontName[80] = "10x20";</span>
- <a name="l00644"></a>00644 <span class="comment">char FixFontName[80] = "9x15bold";</span>
- <a name="l00645"></a>00645 <span class="comment">char SubFontName[80] = "6x10";</span>
- <a name="l00646"></a>00646 <span class="comment">*/</span>
- <a name="l00647"></a><a class="code" href="pumax_8c.html#ac88f1d4af30c4b80d467b24e0a67d17e">00647</a> <span class="keywordtype">char</span> <a class="code" href="pumax_8c.html#ac88f1d4af30c4b80d467b24e0a67d17e">BigFontName</a>[80] = <span class="stringliteral">"9x15bold"</span>;
- <a name="l00648"></a><a class="code" href="pumax_8c.html#a0dfce9f22b144572a07e71ee4120f7a4">00648</a> <span class="keywordtype">char</span> <a class="code" href="pumax_8c.html#a0dfce9f22b144572a07e71ee4120f7a4">FixFontName</a>[80] = <span class="stringliteral">"8x13"</span>;
- <a name="l00649"></a><a class="code" href="pumax_8c.html#a8b8af1f04742fe9a27013438a03c83be">00649</a> <span class="keywordtype">char</span> <a class="code" href="pumax_8c.html#a8b8af1f04742fe9a27013438a03c83be">SubFontName</a>[80] = <span class="stringliteral">"6x10"</span>;
- <a name="l00650"></a>00650
- <a name="l00651"></a><a class="code" href="pumax_8c.html#aa665023c2263df19f760e32916bc9e42">00651</a> XFontStruct *<a class="code" href="pumax_8c.html#aa665023c2263df19f760e32916bc9e42">FixFont</a>;
- <a name="l00652"></a><a class="code" href="pumax_8c.html#aeeafbfd2206f5cce04261de84032d7df">00652</a> XFontStruct *<a class="code" href="pumax_8c.html#aeeafbfd2206f5cce04261de84032d7df">SubFont</a>;
- <a name="l00653"></a><a class="code" href="pumax_8c.html#a4dcf23c0ccdb238f29350d275a3926b4">00653</a> XFontStruct *<a class="code" href="pumax_8c.html#a4dcf23c0ccdb238f29350d275a3926b4">BigFont</a>;
- <a name="l00654"></a><a class="code" href="pumax_8c.html#add5a8c33565a2bbcf55996cccc7a434b">00654</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#add5a8c33565a2bbcf55996cccc7a434b">FixFontHeight</a>;
- <a name="l00655"></a><a class="code" href="pumax_8c.html#a3b56ff536f01a928acf89073cf8e0a2f">00655</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a3b56ff536f01a928acf89073cf8e0a2f">SubFontHeight</a>;
- <a name="l00656"></a><a class="code" href="pumax_8c.html#a1d2254b4c4eccb72efc38d231910fe68">00656</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a1d2254b4c4eccb72efc38d231910fe68">BigFontHeight</a>;
- <a name="l00657"></a><a class="code" href="pumax_8c.html#ae7e27f08b8bcd6f7cf63edc4b0859d7f">00657</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ae7e27f08b8bcd6f7cf63edc4b0859d7f">FixFontWidth</a>;
- <a name="l00658"></a><a class="code" href="pumax_8c.html#ad6e35671960b7a01f3afc538555c3443">00658</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ad6e35671960b7a01f3afc538555c3443">SubFontWidth</a>;
- <a name="l00659"></a><a class="code" href="pumax_8c.html#aefafab89c009b3e4258f1216ae91e76c">00659</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#aefafab89c009b3e4258f1216ae91e76c">BigFontWidth</a>;
- <a name="l00660"></a><a class="code" href="pumax_8c.html#a96ff7ba2422425d32efc6957aa8ff02d">00660</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a96ff7ba2422425d32efc6957aa8ff02d">Paused</a> = 0;
- <a name="l00661"></a>00661
- <a name="l00662"></a><a class="code" href="pumax_8c.html#a4b3dc854913a2dc6d39a8f54f82a01da">00662</a> <span class="keywordtype">char</span> *<a class="code" href="pumax_8c.html#a4b3dc854913a2dc6d39a8f54f82a01da">display_name</a> = NULL;
- <a name="l00663"></a><a class="code" href="pumax_8c.html#ab1d0850a89665ee3f84bc8124f642a2f">00663</a> XWMHints <a class="code" href="pumax_8c.html#ab1d0850a89665ee3f84bc8124f642a2f">wm_hints</a>;
- <a name="l00664"></a><a class="code" href="pumax_8c.html#a33c22d728e615ac6724129e7f9e20b65">00664</a> XClassHint <a class="code" href="pumax_8c.html#a33c22d728e615ac6724129e7f9e20b65">class_hints</a>;
- <a name="l00665"></a><a class="code" href="pumax_8c.html#a4ab647baec66a74bffd8aa64f3b0559b">00665</a> Atom <a class="code" href="pumax_8c.html#a4ab647baec66a74bffd8aa64f3b0559b">Delwin</a>;
- <a name="l00666"></a>00666
- <a name="l00667"></a><a class="code" href="pumax_8c.html#ab5d54d649481f4920e248554c9344ee9">00667</a> <span class="keywordtype">char</span> *<a class="code" href="pumax_8c.html#ab5d54d649481f4920e248554c9344ee9">WindowTitle</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00668"></a><a class="code" href="pumax_8c.html#a3f1a182472dccdeaffafe72909b33d80">00668</a> XTextProperty <a class="code" href="pumax_8c.html#a3f1a182472dccdeaffafe72909b33d80">WindowName</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00669"></a><a class="code" href="pumax_8c.html#a8aa81ba9770148a0ca89a5262dc62fd4">00669</a> XTextProperty <a class="code" href="pumax_8c.html#a8aa81ba9770148a0ca89a5262dc62fd4">HelpName</a>;
- <a name="l00670"></a>00670
- <a name="l00671"></a><a class="code" href="pumax_8c.html#abe8f3031f9de5c3b3cc5647e676d5655">00671</a> <span class="keywordtype">char</span> *<a class="code" href="pumax_8c.html#abe8f3031f9de5c3b3cc5647e676d5655">mona</a>[12] =
- <a name="l00672"></a>00672 {
- <a name="l00673"></a>00673 <span class="stringliteral">"Jan"</span>,<span class="stringliteral">"Feb"</span>,<span class="stringliteral">"Mar"</span>,
- <a name="l00674"></a>00674 <span class="stringliteral">"Apr"</span>,<span class="stringliteral">"May"</span>,<span class="stringliteral">"Jun"</span>,
- <a name="l00675"></a>00675 <span class="stringliteral">"Jul"</span>,<span class="stringliteral">"Aug"</span>,<span class="stringliteral">"Sep"</span>,
- <a name="l00676"></a>00676 <span class="stringliteral">"Oct"</span>,<span class="stringliteral">"Nov"</span>,<span class="stringliteral">"Dec"</span>
- <a name="l00677"></a>00677 };
- <a name="l00678"></a>00678
- <a name="l00679"></a><a class="code" href="pumax_8c.html#aab3181057dc5a08451a3dd3ef3699407">00679</a> <span class="keywordtype">char</span> *<a class="code" href="pumax_8c.html#aab3181057dc5a08451a3dd3ef3699407">wena</a>[7] = {<span class="stringliteral">"Mon"</span>,<span class="stringliteral">"Tue"</span>,<span class="stringliteral">"Wed"</span>,<span class="stringliteral">"Thu"</span>,<span class="stringliteral">"Fri"</span>,<span class="stringliteral">"Sat"</span>,<span class="stringliteral">"Sun"</span>};
- <a name="l00680"></a>00680
- <a name="l00681"></a><a class="code" href="pumax_8c.html#a3c3df9a533eb74fcdcd614a15a8026dc">00681</a> <span class="keywordtype">char</span> <a class="code" href="pumax_8c.html#a3c3df9a533eb74fcdcd614a15a8026dc">datch</a>[64];
- <a name="l00682"></a><a class="code" href="pumax_8c.html#a4168425458c9b1c2863cc90405a1511b">00682</a> <span class="keywordtype">char</span> <a class="code" href="pumax_8c.html#a4168425458c9b1c2863cc90405a1511b">PlanetName</a>[32] = <span class="stringliteral">"Earth"</span>;
- <a name="l00683"></a>00683
- <a name="l00684"></a><a class="code" href="pumax_8c.html#a1de965a50098fbe98a09aea521c8df59">00684</a> <span class="keywordtype">char</span> <a class="code" href="pumax_8c.html#a1de965a50098fbe98a09aea521c8df59">GUI_default</a>[80] = <span class="stringliteral">"GUI.cfg"</span>;
- <a name="l00685"></a><a class="code" href="pumax_8c.html#a6e4709092394d2b39f82b5de515c0aad">00685</a> <span class="keywordtype">char</span> <a class="code" href="pumax_8c.html#a6e4709092394d2b39f82b5de515c0aad">GUI_config</a>[80] = <span class="stringliteral">"GUI_last_used.cfg"</span>;
- <a name="l00686"></a>00686
- <a name="l00687"></a>00687
- <a name="l00688"></a><a class="code" href="pumax_8c.html#ac94f19a0578e5b444225233739749082">00688</a> <span class="preprocessor">#define PSDIM 30</span>
- <a name="l00689"></a><a class="code" href="pumax_8c.html#acf637dc464a350b08d37bc9c78040206">00689</a> <span class="preprocessor"></span><span class="keywordtype">char</span> *<a class="code" href="pumax_8c.html#acf637dc464a350b08d37bc9c78040206">pixelstar</a>[<a class="code" href="pumax_8c.html#ac94f19a0578e5b444225233739749082">PSDIM</a>] = {
- <a name="l00690"></a>00690 <span class="stringliteral">".............................."</span>,
- <a name="l00691"></a>00691 <span class="stringliteral">".............................."</span>,
- <a name="l00692"></a>00692 <span class="stringliteral">".............................."</span>,
- <a name="l00693"></a>00693 <span class="stringliteral">"...**....**....**....**......."</span>,
- <a name="l00694"></a>00694 <span class="stringliteral">"...**....**....**....**......."</span>,
- <a name="l00695"></a>00695 <span class="stringliteral">"...**....**....**....**......."</span>,
- <a name="l00696"></a>00696 <span class="stringliteral">"...**....**....**....**......."</span>,
- <a name="l00697"></a>00697 <span class="stringliteral">"...**....**************......."</span>,
- <a name="l00698"></a>00698 <span class="stringliteral">"...**....**************......."</span>,
- <a name="l00699"></a>00699 <span class="stringliteral">"...**....**....**....**......."</span>,
- <a name="l00700"></a>00700 <span class="stringliteral">"...***...**....**....**......."</span>,
- <a name="l00701"></a>00701 <span class="stringliteral">"....******.....**....**......."</span>,
- <a name="l00702"></a>00702 <span class="stringliteral">".....****......**....**......."</span>,
- <a name="l00703"></a>00703 <span class="stringliteral">".............................."</span>,
- <a name="l00704"></a>00704 <span class="stringliteral">".............................."</span>,
- <a name="l00705"></a>00705 <span class="stringliteral">".............................."</span>,
- <a name="l00706"></a>00706 <span class="stringliteral">".............................."</span>,
- <a name="l00707"></a>00707 <span class="stringliteral">".............................."</span>,
- <a name="l00708"></a>00708 <span class="stringliteral">".............................."</span>,
- <a name="l00709"></a>00709 <span class="stringliteral">".............................."</span>,
- <a name="l00710"></a>00710 <span class="stringliteral">".............................."</span>,
- <a name="l00711"></a>00711 <span class="stringliteral">".............................."</span>,
- <a name="l00712"></a>00712 <span class="stringliteral">".......................*......"</span>,
- <a name="l00713"></a>00713 <span class="stringliteral">"......................***....."</span>,
- <a name="l00714"></a>00714 <span class="stringliteral">"...................**.***.**.."</span>,
- <a name="l00715"></a>00715 <span class="stringliteral">"...................**.***.**.."</span>,
- <a name="l00716"></a>00716 <span class="stringliteral">"...................**.***.**.."</span>,
- <a name="l00717"></a>00717 <span class="stringliteral">"...................****.****.."</span>,
- <a name="l00718"></a>00718 <span class="stringliteral">"...................***...***.."</span>,
- <a name="l00719"></a>00719 <span class="stringliteral">"...................***...***.."</span>};
- <a name="l00720"></a>00720
- <a name="l00721"></a>00721 <span class="comment">// Variables used for calculating "frames per second"</span>
- <a name="l00722"></a>00722
- <a name="l00723"></a><a class="code" href="pumax_8c.html#a45b67662d620a977a2cfe519f7ab6273">00723</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a45b67662d620a977a2cfe519f7ab6273">fps</a>;
- <a name="l00724"></a><a class="code" href="pumax_8c.html#abbe54d9d31d45c4bf9b3881ab71b3d9d">00724</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#abbe54d9d31d45c4bf9b3881ab71b3d9d">rmuf</a> = 20; <span class="comment">// Rotating map update frequency [1/sec]</span>
- <a name="l00725"></a><a class="code" href="pumax_8c.html#ae0249a8c73326c7982678429005c059d">00725</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ae0249a8c73326c7982678429005c059d">rmui</a> = 1; <span class="comment">// Rotating map update interval [steps]</span>
- <a name="l00726"></a><a class="code" href="pumax_8c.html#a156205cf644829d37762ef72e26f2bd8">00726</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a156205cf644829d37762ef72e26f2bd8">SkipFreq</a>;
- <a name="l00727"></a><a class="code" href="pumax_8c.html#af22e8278c499183a077f11d9f2aa1922">00727</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#af22e8278c499183a077f11d9f2aa1922">ThisSecond</a>;
- <a name="l00728"></a><a class="code" href="pumax_8c.html#a959fb7a5f8194231fd7d9c9255dd8176">00728</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a959fb7a5f8194231fd7d9c9255dd8176">LastSecond</a>;
- <a name="l00729"></a><a class="code" href="pumax_8c.html#af0d7de5b658838770aedc6e81c2bfbba">00729</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#af0d7de5b658838770aedc6e81c2bfbba">LastStep</a>;
- <a name="l00730"></a><a class="code" href="pumax_8c.html#a0358d36d86cd182699f08224c9f61aec">00730</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a0358d36d86cd182699f08224c9f61aec">SecEvent</a>;
- <a name="l00731"></a>00731
- <a name="l00732"></a><a class="code" href="pumax_8c.html#a5d9c6d601c3a2a89c6397da97ae235ff">00732</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a5d9c6d601c3a2a89c6397da97ae235ff">ndatim</a>[6]; <span class="comment">/* year, month, day, hour, minute, weekday */</span>
- <a name="l00733"></a><a class="code" href="pumax_8c.html#a431f109cd0fda419267defc94d5e4926">00733</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a431f109cd0fda419267defc94d5e4926">LastMinute</a>; <span class="comment">/* Last value of ndatim(4) */</span>
- <a name="l00734"></a><a class="code" href="pumax_8c.html#aa82f23779010beeff2184e4bd6aa1881">00734</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#aa82f23779010beeff2184e4bd6aa1881">DeltaTime</a> ; <span class="comment">/* Computed timestep interval [min] */</span>
- <a name="l00735"></a>00735
- <a name="l00736"></a><a class="code" href="struct_b_m_istruct.html">00736</a> <span class="keyword">struct </span><a class="code" href="struct_b_m_istruct.html">BMIstruct</a>
- <a name="l00737"></a>00737 {
- <a name="l00738"></a><a class="code" href="struct_b_m_istruct.html#acfe239d5fa92bc82701fafaf72efcacf">00738</a> <span class="keywordtype">int</span> <a class="code" href="struct_b_m_istruct.html#acfe239d5fa92bc82701fafaf72efcacf">Size</a>;
- <a name="l00739"></a><a class="code" href="struct_b_m_istruct.html#a6486fcb19864264947f29b30c5a1d6e9">00739</a> <span class="keywordtype">int</span> <a class="code" href="struct_b_m_istruct.html#a6486fcb19864264947f29b30c5a1d6e9">Width</a>;
- <a name="l00740"></a><a class="code" href="struct_b_m_istruct.html#a52746e7d2f7de61866c6a2217083d1a5">00740</a> <span class="keywordtype">int</span> <a class="code" href="struct_b_m_istruct.html#a52746e7d2f7de61866c6a2217083d1a5">Height</a>;
- <a name="l00741"></a><a class="code" href="struct_b_m_istruct.html#a29b39d5bd71bb03b8b09b0de1a4b9c8d">00741</a> <span class="keywordtype">short</span> <a class="code" href="struct_b_m_istruct.html#a29b39d5bd71bb03b8b09b0de1a4b9c8d">Planes</a>;
- <a name="l00742"></a><a class="code" href="struct_b_m_istruct.html#a116a68a16b53430a1a9f0bdf657e53c8">00742</a> <span class="keywordtype">short</span> <a class="code" href="struct_b_m_istruct.html#a116a68a16b53430a1a9f0bdf657e53c8">Count</a>;
- <a name="l00743"></a><a class="code" href="struct_b_m_istruct.html#a28c320842950835ff4de540ed4c4b4fd">00743</a> <span class="keywordtype">int</span> <a class="code" href="struct_b_m_istruct.html#a28c320842950835ff4de540ed4c4b4fd">Compression</a>;
- <a name="l00744"></a><a class="code" href="struct_b_m_istruct.html#a11df57e6d765d04cd654eb68e9ed5606">00744</a> <span class="keywordtype">int</span> <a class="code" href="struct_b_m_istruct.html#a11df57e6d765d04cd654eb68e9ed5606">SizeImage</a>;
- <a name="l00745"></a><a class="code" href="struct_b_m_istruct.html#ad14c3cac819fdb1563374c2ef4913aac">00745</a> <span class="keywordtype">int</span> <a class="code" href="struct_b_m_istruct.html#ad14c3cac819fdb1563374c2ef4913aac">XPelsPerMeter</a>;
- <a name="l00746"></a><a class="code" href="struct_b_m_istruct.html#a0eae4b963d52b8a8eb15fc6275f8b481">00746</a> <span class="keywordtype">int</span> <a class="code" href="struct_b_m_istruct.html#a0eae4b963d52b8a8eb15fc6275f8b481">YPelsPerMeter</a>;
- <a name="l00747"></a><a class="code" href="struct_b_m_istruct.html#a8f8f9ef7e30ba0653ba479b28676c3ce">00747</a> <span class="keywordtype">int</span> <a class="code" href="struct_b_m_istruct.html#a8f8f9ef7e30ba0653ba479b28676c3ce">ClrUsed</a>;
- <a name="l00748"></a><a class="code" href="struct_b_m_istruct.html#a357dc62501d321ff870187909c3c4b5f">00748</a> <span class="keywordtype">int</span> <a class="code" href="struct_b_m_istruct.html#a357dc62501d321ff870187909c3c4b5f">ClrImportant</a>;
- <a name="l00749"></a>00749 };
- <a name="l00750"></a>00750
- <a name="l00751"></a><a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">00751</a> <span class="keyword">struct </span><a class="code" href="struct_b_m_istruct.html">BMIstruct</a> <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>;
- <a name="l00752"></a>00752
- <a name="l00753"></a><a class="code" href="struct_map_image_struct.html">00753</a> <span class="keyword">struct </span><a class="code" href="struct_map_image_struct.html">MapImageStruct</a>
- <a name="l00754"></a>00754 {
- <a name="l00755"></a><a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">00755</a> <span class="keywordtype">char</span> *<a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a>; <span class="comment">// Bitmap data</span>
- <a name="l00756"></a><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">00756</a> <span class="keywordtype">int</span> <a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>; <span class="comment">// Image width</span>
- <a name="l00757"></a><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">00757</a> <span class="keywordtype">int</span> <a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a>; <span class="comment">// Image height</span>
- <a name="l00758"></a><a class="code" href="struct_map_image_struct.html#a7c3018a3883c438e08c5632a49e39c66">00758</a> <span class="keywordtype">int</span> <a class="code" href="struct_map_image_struct.html#a7c3018a3883c438e08c5632a49e39c66">f</a>; <span class="comment">// Rotation factor</span>
- <a name="l00759"></a><a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">00759</a> <span class="keywordtype">float</span> <a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a>; <span class="comment">// Reference longitude</span>
- <a name="l00760"></a><a class="code" href="struct_map_image_struct.html#a0c135dc0852d411fd87b7ac84ba55664">00760</a> <span class="keywordtype">float</span> <a class="code" href="struct_map_image_struct.html#a0c135dc0852d411fd87b7ac84ba55664">r</a>; <span class="comment">// Rotation speed [deg/step]</span>
- <a name="l00761"></a><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">00761</a> XImage *<a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>; <span class="comment">// XImage structure</span>
- <a name="l00762"></a>00762 };
- <a name="l00763"></a>00763
- <a name="l00764"></a>00764 <span class="comment">// Convert an RGB value to an X11 Pixel</span>
- <a name="l00765"></a>00765
- <a name="l00766"></a><a class="code" href="pumax_8c.html#a6abc2b45ddd56d2171e775e89537fc04">00766</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="pumax_8c.html#a6abc2b45ddd56d2171e775e89537fc04">create_pixel</a>(<span class="keywordtype">long</span> red, <span class="keywordtype">long</span> green, <span class="keywordtype">long</span> blue)
- <a name="l00767"></a>00767 {
- <a name="l00768"></a>00768 <span class="keywordflow">if</span> (ScreenD == 24) <span class="comment">// 24 bit true color</span>
- <a name="l00769"></a>00769 {
- <a name="l00770"></a>00770 <span class="keywordflow">return</span> red | green << 8 | blue << 16;
- <a name="l00771"></a>00771 }
- <a name="l00772"></a>00772 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ScreenD == 16) <span class="comment">// 16 bit RGB 565</span>
- <a name="l00773"></a>00773 {
- <a name="l00774"></a>00774 <span class="keywordflow">return</span> red >> 3 | (green >> 2) << 5 | (blue >> 3) << 11;
- <a name="l00775"></a>00775 }
- <a name="l00776"></a>00776 <span class="keywordflow">else</span> <span class="keywordflow">return</span> 0;
- <a name="l00777"></a>00777 }
- <a name="l00778"></a>00778
- <a name="l00779"></a><a class="code" href="pumax_8c.html#a0aac8b0778521c19e621a6b60b3e1a4b">00779</a> <span class="keyword">struct </span><a class="code" href="struct_map_image_struct.html">MapImageStruct</a> <a class="code" href="pumax_8c.html#a0aac8b0778521c19e621a6b60b3e1a4b">MapHR</a>; <span class="comment">// Hires (2560x1280) Earth image</span>
- <a name="l00780"></a><a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">00780</a> <span class="keyword">struct </span><a class="code" href="struct_map_image_struct.html">MapImageStruct</a> <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[<a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>];
- <a name="l00781"></a>00781
- <a name="l00782"></a><a class="code" href="pumax_8c.html#a662cbf19367e08f6e376f8d1e3b765e0">00782</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a662cbf19367e08f6e376f8d1e3b765e0">ScaleImage</a>(<span class="keyword">struct</span> <a class="code" href="struct_map_image_struct.html">MapImageStruct</a> *s, <span class="keyword">struct</span> <a class="code" href="struct_map_image_struct.html">MapImageStruct</a> *<a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a>)
- <a name="l00783"></a>00783 {
- <a name="l00784"></a>00784 <span class="keywordtype">int</span> a,b,x,y;
- <a name="l00785"></a>00785 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> px;
- <a name="l00786"></a>00786 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a>,<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>;
- <a name="l00787"></a>00787 <span class="keywordtype">double</span> <a class="code" href="struct_map_image_struct.html#a7c3018a3883c438e08c5632a49e39c66">f</a>,g;
- <a name="l00788"></a>00788
- <a name="l00789"></a>00789 <span class="keywordflow">if</span> (d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>) XDestroyImage(d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>);
- <a name="l00790"></a>00790 w = (d-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a> + 7) & 0xFFF8;
- <a name="l00791"></a>00791 h = d-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a>;
- <a name="l00792"></a>00792 d-><a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a> = malloc(4 * w * h);
- <a name="l00793"></a>00793 d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a> = XCreateImage(display,CopyFromParent,ScreenD,ZPixmap,0,
- <a name="l00794"></a>00794 d-><a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a>,w,h,8,0);
- <a name="l00795"></a>00795
- <a name="l00796"></a>00796 f = (double)s-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a> / (<span class="keywordtype">double</span>)d-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>;
- <a name="l00797"></a>00797 g = (double)s-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a> / (<span class="keywordtype">double</span>)d-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a>;
- <a name="l00798"></a>00798
- <a name="l00799"></a>00799 <span class="keywordflow">for</span> (y = 0 ; y < d-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a> ; ++y)
- <a name="l00800"></a>00800 <span class="keywordflow">for</span> (x = 0 ; x < d-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a> ; ++x)
- <a name="l00801"></a>00801 {
- <a name="l00802"></a>00802 a = x * <a class="code" href="struct_map_image_struct.html#a7c3018a3883c438e08c5632a49e39c66">f</a>;
- <a name="l00803"></a>00803 b = y * g;
- <a name="l00804"></a>00804 XPutPixel(d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>,x,y,XGetPixel(s-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>,a,b));
- <a name="l00805"></a>00805 }
- <a name="l00806"></a>00806 }
- <a name="l00807"></a>00807
- <a name="l00808"></a>00808
- <a name="l00809"></a><a class="code" href="pumax_8c.html#a2a67fb15956dca4db41c85496c11240e">00809</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a2a67fb15956dca4db41c85496c11240e">PolarImage</a>(<span class="keyword">struct</span> <a class="code" href="struct_map_image_struct.html">MapImageStruct</a> *s, <span class="keyword">struct</span> <a class="code" href="struct_map_image_struct.html">MapImageStruct</a> *<a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a>)
- <a name="l00810"></a>00810 {
- <a name="l00811"></a>00811 <span class="keywordtype">int</span> a,b,x,y;
- <a name="l00812"></a>00812 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a>,<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>;
- <a name="l00813"></a>00813 <span class="keywordtype">double</span> <a class="code" href="struct_map_image_struct.html#a7c3018a3883c438e08c5632a49e39c66">f</a>,lfa,xnp,ynp,xsp,ysp,dx,dy;
- <a name="l00814"></a>00814
- <a name="l00815"></a>00815 <span class="keywordflow">if</span> (d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>) XDestroyImage(d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>);
- <a name="l00816"></a>00816 w = (d-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a> + 7) & 0xFFF8;
- <a name="l00817"></a>00817 h = d-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a>;
- <a name="l00818"></a>00818 d-><a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a> = malloc(4 * w * h);
- <a name="l00819"></a>00819 d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a> = XCreateImage(display,CopyFromParent,ScreenD,ZPixmap,0,
- <a name="l00820"></a>00820 d-><a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a>,w,h,8,0);
- <a name="l00821"></a>00821
- <a name="l00822"></a>00822 f = (double)s-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a> / (<span class="keywordtype">double</span>)d-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a>;
- <a name="l00823"></a>00823 lfa = (s-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>-1) / (2.0 * M_PI);
- <a name="l00824"></a>00824 xnp = (d-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>) * 0.25;
- <a name="l00825"></a>00825 ynp = (d-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a>) * 0.50;
- <a name="l00826"></a>00826 xsp = (d-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>) * 0.75;
- <a name="l00827"></a>00827 ysp = ynp;
- <a name="l00828"></a>00828
- <a name="l00829"></a>00829 <span class="keywordflow">for</span> (y = 0 ; y < d-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a> ; ++y)
- <a name="l00830"></a>00830 {
- <a name="l00831"></a>00831 dy = ynp - y;
- <a name="l00832"></a>00832 <span class="keywordflow">for</span> (x = 0 ; x < d-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>/2 ; ++x) <span class="comment">/* Northern hemisphere */</span>
- <a name="l00833"></a>00833 {
- <a name="l00834"></a>00834 dx = xnp - x;
- <a name="l00835"></a>00835 a = atan2(dx,dy) * lfa;
- <a name="l00836"></a>00836 b = sqrt(dx * dx + dy * dy) * <a class="code" href="struct_map_image_struct.html#a7c3018a3883c438e08c5632a49e39c66">f</a>;
- <a name="l00837"></a>00837 <span class="keywordflow">if</span> (a < 0.0) a += (s-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>);
- <a name="l00838"></a>00838 <span class="keywordflow">if</span> (a >= 0 && a < s->w && b >= 0 && b <= s->h/2)
- <a name="l00839"></a>00839 XPutPixel(d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>,x,y,XGetPixel(s-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>,a,b));
- <a name="l00840"></a>00840 <span class="keywordflow">else</span> XPutPixel(d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>,x,y,BlackPix);
- <a name="l00841"></a>00841 }
- <a name="l00842"></a>00842 dy = ysp - y;
- <a name="l00843"></a>00843 <span class="keywordflow">for</span> (x = d-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>/2 ; x < d->w ; ++x) <span class="comment">/* Southern hemisphere */</span>
- <a name="l00844"></a>00844 {
- <a name="l00845"></a>00845 dx = x - xsp;
- <a name="l00846"></a>00846 a = atan2(dx,dy) * lfa;
- <a name="l00847"></a>00847 b = s-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a> - f * sqrt(dx * dx + dy * dy);
- <a name="l00848"></a>00848 <span class="keywordflow">if</span> (a < 0.0) a += (s-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>);
- <a name="l00849"></a>00849 <span class="keywordflow">if</span> (a >= 0 && a < s->w && b >= 0 && b >= s-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a>/2 && b <= s->h)
- <a name="l00850"></a>00850 XPutPixel(d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>,x,y,XGetPixel(s-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>,a,b));
- <a name="l00851"></a>00851 <span class="keywordflow">else</span> XPutPixel(d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>,x,y,BlackPix);
- <a name="l00852"></a>00852 }
- <a name="l00853"></a>00853 }
- <a name="l00854"></a>00854 }
- <a name="l00855"></a>00855
- <a name="l00856"></a>00856
- <a name="l00857"></a><a class="code" href="pumax_8c.html#a13fe574b091b3f6d1d2397d51a209cef">00857</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a13fe574b091b3f6d1d2397d51a209cef">RevOrtho</a>(<span class="keywordtype">double</span> R, <span class="keywordtype">double</span> lam0, <span class="keywordtype">double</span> phi0, <span class="keywordtype">int</span> xx, <span class="keywordtype">int</span> yy, <span class="keywordtype">double</span> *lam, <span class="keywordtype">double</span> *phi)
- <a name="l00858"></a>00858 {
- <a name="l00859"></a>00859 <span class="keywordtype">double</span> rho,c,rhoq,x,y;
- <a name="l00860"></a>00860
- <a name="l00861"></a>00861 x = xx;
- <a name="l00862"></a>00862 y = yy;
- <a name="l00863"></a>00863
- <a name="l00864"></a>00864 rhoq = x*x + y*y;
- <a name="l00865"></a>00865 rho = sqrt(rhoq);
- <a name="l00866"></a>00866 <span class="keywordflow">if</span> (rho > R)
- <a name="l00867"></a>00867 {
- <a name="l00868"></a>00868 *phi = 999.9;
- <a name="l00869"></a>00869 *lam = 999.9;
- <a name="l00870"></a>00870 }
- <a name="l00871"></a>00871 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (rho > R / 100000.0)
- <a name="l00872"></a>00872 {
- <a name="l00873"></a>00873 c = asin(rho / R);
- <a name="l00874"></a>00874 *phi = asin(cos(c) * sin(phi0) + y * sin(c) * cos(phi0) / rho);
- <a name="l00875"></a>00875 *lam = lam0 + atan2(x * sin(c) , rho * cos(phi0) * cos(c) - y * sin(phi0) * sin(c));
- <a name="l00876"></a>00876 }
- <a name="l00877"></a>00877 <span class="keywordflow">else</span>
- <a name="l00878"></a>00878 {
- <a name="l00879"></a>00879 *phi = phi0;
- <a name="l00880"></a>00880 *lam = lam0;
- <a name="l00881"></a>00881 }
- <a name="l00882"></a>00882 <span class="comment">// printf("[%6.1lf / %6.1lf] --> (%6.1lf / %6.1lf)\n",x,y,*lam,*phi);</span>
- <a name="l00883"></a>00883 }
- <a name="l00884"></a>00884
- <a name="l00885"></a>00885 <span class="comment">/* ==================================================== */</span>
- <a name="l00886"></a>00886 <span class="comment">/* AzimuthalImage - Display map in azimuthal projection */</span>
- <a name="l00887"></a>00887 <span class="comment">/* ==================================================== */</span>
- <a name="l00888"></a>00888
- <a name="l00889"></a><a class="code" href="pumax_8c.html#ad027458730957d93b4a352feed5ea06d">00889</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#ad027458730957d93b4a352feed5ea06d">AzimuthalImage</a>(<span class="keyword">struct</span> <a class="code" href="struct_map_image_struct.html">MapImageStruct</a> *s, <span class="keyword">struct</span> <a class="code" href="struct_map_image_struct.html">MapImageStruct</a> *<a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a>)
- <a name="l00890"></a>00890 {
- <a name="l00891"></a>00891 <span class="keywordtype">int</span> lam; <span class="comment">// lambda pixel coordinate in source image</span>
- <a name="l00892"></a>00892 <span class="keywordtype">int</span> phi; <span class="comment">// phi pixel coordinate in source image</span>
- <a name="l00893"></a>00893 <span class="keywordtype">int</span> x ; <span class="comment">// x pixel coordinate in destination image</span>
- <a name="l00894"></a>00894 <span class="keywordtype">int</span> y ; <span class="comment">// y pixel coordinate in destination image</span>
- <a name="l00895"></a>00895 <span class="keywordtype">int</span> dxc; <span class="comment">// pixel coordinate of centre position</span>
- <a name="l00896"></a>00896 <span class="keywordtype">int</span> dxl; <span class="comment">// pixel coordinate of left most position</span>
- <a name="l00897"></a>00897 <span class="keywordtype">int</span> dxr; <span class="comment">// pixel coordinate of right most position</span>
- <a name="l00898"></a>00898 <span class="keywordtype">int</span> dx ; <span class="comment">// centre relative x position</span>
- <a name="l00899"></a>00899 <span class="keywordtype">int</span> dy ; <span class="comment">// centre relative y position</span>
- <a name="l00900"></a>00900 <span class="keywordtype">int</span> p00; <span class="comment">// euqator</span>
- <a name="l00901"></a>00901 <span class="keywordtype">int</span> l00; <span class="comment">// reference longitude</span>
- <a name="l00902"></a>00902
- <a name="l00903"></a>00903 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> dih; <span class="comment">// destination image height</span>
- <a name="l00904"></a>00904 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> diw; <span class="comment">// destination image width</span>
- <a name="l00905"></a>00905 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> dpw; <span class="comment">// destination image padded width</span>
- <a name="l00906"></a>00906
- <a name="l00907"></a>00907 <span class="keywordtype">double</span> rad; <span class="comment">// pixel radius of new image</span>
- <a name="l00908"></a>00908 <span class="keywordtype">double</span> ysc; <span class="comment">// yscale = source height / destination height</span>
- <a name="l00909"></a>00909 <span class="keywordtype">double</span> rho; <span class="comment">// distance from centre</span>
- <a name="l00910"></a>00910 <span class="keywordtype">double</span> xpi; <span class="comment">// x scale factor = 2 * PI / width</span>
- <a name="l00911"></a>00911 <span class="keywordtype">double</span> ypi; <span class="comment">// y scale factor = PI / height</span>
- <a name="l00912"></a>00912 <span class="keywordtype">double</span> xrf;
- <a name="l00913"></a>00913 <span class="keywordtype">double</span> yrf;
- <a name="l00914"></a>00914
- <a name="l00915"></a>00915 XImage *sX; <span class="comment">// source image</span>
- <a name="l00916"></a>00916 XImage *dX; <span class="comment">// destination image</span>
- <a name="l00917"></a>00917
- <a name="l00918"></a>00918
- <a name="l00919"></a>00919 <span class="comment">// Destroy old image structure inclusive data storage</span>
- <a name="l00920"></a>00920
- <a name="l00921"></a>00921 <span class="keywordflow">if</span> (d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>) XDestroyImage(d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>);
- <a name="l00922"></a>00922
- <a name="l00923"></a>00923 <span class="comment">// Set width of new image</span>
- <a name="l00924"></a>00924
- <a name="l00925"></a>00925 diw = d-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>;
- <a name="l00926"></a>00926
- <a name="l00927"></a>00927 <span class="comment">// Pad width of new image to a multiple of 8</span>
- <a name="l00928"></a>00928
- <a name="l00929"></a>00929 dpw = (diw + 7) & 0xFFF8;
- <a name="l00930"></a>00930
- <a name="l00931"></a>00931 <span class="comment">// Set height of new image</span>
- <a name="l00932"></a>00932
- <a name="l00933"></a>00933 dih = d-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a>;
- <a name="l00934"></a>00934
- <a name="l00935"></a>00935 <span class="comment">// Allocate space for image data</span>
- <a name="l00936"></a>00936
- <a name="l00937"></a>00937 d-><a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a> = calloc(dpw * dih,4);
- <a name="l00938"></a>00938
- <a name="l00939"></a>00939 <span class="comment">// Create image structure</span>
- <a name="l00940"></a>00940
- <a name="l00941"></a>00941 dX = d-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a> = XCreateImage(display,CopyFromParent,ScreenD,ZPixmap,0,d-><a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a>,dpw,dih,8,0);
- <a name="l00942"></a>00942 sX = s-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>;
- <a name="l00943"></a>00943
- <a name="l00944"></a>00944 p00 = s-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a> >> 1;
- <a name="l00945"></a>00945 rad = dih >> 1;
- <a name="l00946"></a>00946 dxc = diw >> 1;
- <a name="l00947"></a>00947 dxl = <a class="code" href="pumax_8c.html#afa99ec4acc4ecb2dc3c2d05da15d0e3f">MAX</a>(dxc - rad, 0);
- <a name="l00948"></a>00948 dxr = <a class="code" href="pumax_8c.html#a3acffbd305ee72dcd4593c0d8af64a4f">MIN</a>(dxc + rad, diw);
- <a name="l00949"></a>00949 xpi = s-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a> / M_PI * 0.5;
- <a name="l00950"></a>00950 ypi = s-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a> / M_PI;
- <a name="l00951"></a>00951 ysc = (double)s-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a> / (<span class="keywordtype">double</span>)dih;
- <a name="l00952"></a>00952 l00 = (int)((d-><a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a> * s-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>) / 360 + s-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>/2) % s-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>;
- <a name="l00953"></a>00953 xrf = (<span class="keywordtype">double</span>)diw / pow(2.0,31),
- <a name="l00954"></a>00954 yrf = (double)dih / pow(2.0,31);
- <a name="l00955"></a>00955
- <a name="l00956"></a>00956 <span class="comment">// Paint some stars on the sky</span>
- <a name="l00957"></a>00957
- <a name="l00958"></a>00958 srandom(Seed);
- <a name="l00959"></a>00959 <span class="keywordflow">for</span> (y = 0 ; y < (diw * dih) >> 8 ; ++y)
- <a name="l00960"></a>00960 XPutPixel(dX,xrf*random(),yrf*random(),WhitePix);
- <a name="l00961"></a>00961
- <a name="l00962"></a>00962 <span class="keywordflow">for</span> (y = 0 ; y < dih ; ++y)
- <a name="l00963"></a>00963 {
- <a name="l00964"></a>00964 dy = y - rad;
- <a name="l00965"></a>00965 phi = y * ysc;
- <a name="l00966"></a>00966 <span class="keywordflow">for</span> (x = dxl ; x < dxr ; ++x)
- <a name="l00967"></a>00967 {
- <a name="l00968"></a>00968 dx = x - dxc;
- <a name="l00969"></a>00969 rho = sqrt(dx * dx + dy * dy);
- <a name="l00970"></a>00970 <span class="keywordflow">if</span> (rho < rad)
- <a name="l00971"></a>00971 {
- <a name="l00972"></a>00972 lam = l00 + xpi * atan2(dx / rad, cos(asin(rho / rad)));
- <a name="l00973"></a>00973 phi = p00 + ypi * asin(dy / rad);
- <a name="l00974"></a>00974 XPutPixel(dX,x,y,XGetPixel(sX,lam,phi));
- <a name="l00975"></a>00975 }
- <a name="l00976"></a>00976 }
- <a name="l00977"></a>00977 }
- <a name="l00978"></a>00978 }
- <a name="l00979"></a>00979
- <a name="l00980"></a>00980
- <a name="l00981"></a><a class="code" href="pumax_8c.html#ac8dc7ad258c2b3a3f4a3780db763bad7">00981</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#ac8dc7ad258c2b3a3f4a3780db763bad7">SwapIEEE16</a>(<span class="keywordtype">char</span> W[2])
- <a name="l00982"></a>00982 {
- <a name="l00983"></a>00983 <span class="keywordtype">char</span> B;
- <a name="l00984"></a>00984
- <a name="l00985"></a>00985 B = W[0]; W[0] = W[1]; W[1] = B;
- <a name="l00986"></a>00986 }
- <a name="l00987"></a>00987
- <a name="l00988"></a><a class="code" href="pumax_8c.html#a532f021f00307a41076fe9bc90f4256a">00988</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a532f021f00307a41076fe9bc90f4256a">SwapIEEE32</a>(<span class="keywordtype">char</span> W[4])
- <a name="l00989"></a>00989 {
- <a name="l00990"></a>00990 <span class="keywordtype">char</span> B;
- <a name="l00991"></a>00991
- <a name="l00992"></a>00992 B = W[0]; W[0] = W[3]; W[3] = B;
- <a name="l00993"></a>00993 B = W[1]; W[1] = W[2]; W[2] = B;
- <a name="l00994"></a>00994 }
- <a name="l00995"></a>00995
- <a name="l00996"></a><a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">00996</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">ReadINT</a>(FILE *fpi)
- <a name="l00997"></a>00997 {
- <a name="l00998"></a>00998 <span class="keywordtype">int</span> k;
- <a name="l00999"></a>00999 fread(&k,<span class="keyword">sizeof</span>(k),1,fpi);
- <a name="l01000"></a>01000 <span class="keywordflow">if</span> (BigEndian) <a class="code" href="pumax_8c.html#a532f021f00307a41076fe9bc90f4256a">SwapIEEE32</a>((<span class="keywordtype">char</span> *)&k);
- <a name="l01001"></a>01001 <span class="keywordflow">return</span> k;
- <a name="l01002"></a>01002 }
- <a name="l01003"></a>01003
- <a name="l01004"></a><a class="code" href="pumax_8c.html#afffefaf1d789c0b6c1c9fd9d8251d402">01004</a> <span class="keywordtype">short</span> <a class="code" href="pumax_8c.html#afffefaf1d789c0b6c1c9fd9d8251d402">ReadSHORT</a>(FILE *fpi)
- <a name="l01005"></a>01005 {
- <a name="l01006"></a>01006 <span class="keywordtype">short</span> k;
- <a name="l01007"></a>01007 fread(&k,<span class="keyword">sizeof</span>(k),1,fpi);
- <a name="l01008"></a>01008 <span class="keywordflow">if</span> (BigEndian) <a class="code" href="pumax_8c.html#ac8dc7ad258c2b3a3f4a3780db763bad7">SwapIEEE16</a>((<span class="keywordtype">char</span> *)&k);
- <a name="l01009"></a>01009 <span class="keywordflow">return</span> k;
- <a name="l01010"></a>01010 }
- <a name="l01011"></a>01011
- <a name="l01012"></a><a class="code" href="pumax_8c.html#a41e1f6018aa05db3f476b89732b96923">01012</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a41e1f6018aa05db3f476b89732b96923">ReadImage</a>(<span class="keyword">struct</span> <a class="code" href="struct_map_image_struct.html">MapImageStruct</a> *ei, <span class="keywordtype">char</span> *filename)
- <a name="l01013"></a>01013 {
- <a name="l01014"></a>01014 <span class="keywordtype">char</span> ch;
- <a name="l01015"></a>01015 <span class="keywordtype">int</span> i,n,x,y,z;
- <a name="l01016"></a>01016 <span class="keywordtype">long</span> <a class="code" href="struct_map_image_struct.html#a0c135dc0852d411fd87b7ac84ba55664">r</a>,g,b;
- <a name="l01017"></a>01017 <span class="keywordtype">int</span> FileSize;
- <a name="l01018"></a>01018 <span class="keywordtype">int</span> Reserved;
- <a name="l01019"></a>01019 <span class="keywordtype">int</span> OffBits;
- <a name="l01020"></a>01020 <span class="keywordtype">int</span> PicBytes;
- <a name="l01021"></a>01021 <span class="keywordtype">int</span> ImgBytes;
- <a name="l01022"></a>01022 <span class="keywordtype">int</span> PadWidth;
- <a name="l01023"></a>01023 <span class="keywordtype">int</span> PadBytes;
- <a name="l01024"></a>01024 <span class="keywordtype">int</span> bpp;
- <a name="l01025"></a>01025 <span class="keywordtype">int</span> byr;
- <a name="l01026"></a>01026 FILE *fp;
- <a name="l01027"></a>01027 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *BuffImageData;
- <a name="l01028"></a>01028
- <a name="l01029"></a>01029 <span class="keywordflow">if</span> (!(fp = fopen(filename,<span class="stringliteral">"r"</span>))) <span class="keywordflow">return</span>;
- <a name="l01030"></a>01030 ch = fgetc(fp);
- <a name="l01031"></a>01031 <span class="keywordflow">if</span> (ch != <span class="charliteral">'B'</span>) <span class="keywordflow">return</span>;
- <a name="l01032"></a>01032 ch = fgetc(fp);
- <a name="l01033"></a>01033 <span class="keywordflow">if</span> (ch != <span class="charliteral">'M'</span>) <span class="keywordflow">return</span>;
- <a name="l01034"></a>01034 FileSize = <a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">ReadINT</a>(fp);
- <a name="l01035"></a>01035 Reserved = <a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">ReadINT</a>(fp);
- <a name="l01036"></a>01036 OffBits = <a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">ReadINT</a>(fp);
- <a name="l01037"></a>01037
- <a name="l01038"></a>01038 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>)
- <a name="l01039"></a>01039 {
- <a name="l01040"></a>01040 printf(<span class="stringliteral">"Properties of %s:\n"</span>,filename);
- <a name="l01041"></a>01041 printf(<span class="stringliteral">"FileSize = %d\n"</span>,FileSize);
- <a name="l01042"></a>01042 printf(<span class="stringliteral">"FileOffset = %d\n"</span>,OffBits);
- <a name="l01043"></a>01043 }
- <a name="l01044"></a>01044
- <a name="l01045"></a>01045 <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#acfe239d5fa92bc82701fafaf72efcacf">Size</a> = <a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">ReadINT</a>(fp);
- <a name="l01046"></a>01046 <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a6486fcb19864264947f29b30c5a1d6e9">Width</a> = <a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">ReadINT</a>(fp);
- <a name="l01047"></a>01047 <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a52746e7d2f7de61866c6a2217083d1a5">Height</a> = <a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">ReadINT</a>(fp);
- <a name="l01048"></a>01048 <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a29b39d5bd71bb03b8b09b0de1a4b9c8d">Planes</a> = <a class="code" href="pumax_8c.html#afffefaf1d789c0b6c1c9fd9d8251d402">ReadSHORT</a>(fp);
- <a name="l01049"></a>01049 <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a116a68a16b53430a1a9f0bdf657e53c8">Count</a> = <a class="code" href="pumax_8c.html#afffefaf1d789c0b6c1c9fd9d8251d402">ReadSHORT</a>(fp);
- <a name="l01050"></a>01050 <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a28c320842950835ff4de540ed4c4b4fd">Compression</a> = <a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">ReadINT</a>(fp);
- <a name="l01051"></a>01051 <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a11df57e6d765d04cd654eb68e9ed5606">SizeImage</a> = <a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">ReadINT</a>(fp);
- <a name="l01052"></a>01052 <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#ad14c3cac819fdb1563374c2ef4913aac">XPelsPerMeter</a> = <a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">ReadINT</a>(fp);
- <a name="l01053"></a>01053 <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a0eae4b963d52b8a8eb15fc6275f8b481">YPelsPerMeter</a> = <a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">ReadINT</a>(fp);
- <a name="l01054"></a>01054 <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a8f8f9ef7e30ba0653ba479b28676c3ce">ClrUsed</a> = <a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">ReadINT</a>(fp);
- <a name="l01055"></a>01055 <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a357dc62501d321ff870187909c3c4b5f">ClrImportant</a> = <a class="code" href="pumax_8c.html#a0ebbbcd7d22dfb611d01499a87802d6e">ReadINT</a>(fp);
- <a name="l01056"></a>01056
- <a name="l01057"></a>01057 PadWidth = (<a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a6486fcb19864264947f29b30c5a1d6e9">Width</a> + 7) & 0xFFF8;
- <a name="l01058"></a>01058 bpp = <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a116a68a16b53430a1a9f0bdf657e53c8">Count</a> >> 3;
- <a name="l01059"></a>01059 PadBytes = (4 - ((<a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a6486fcb19864264947f29b30c5a1d6e9">Width</a> * bpp) % 4)) % 4 ;
- <a name="l01060"></a>01060
- <a name="l01061"></a>01061 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>)
- <a name="l01062"></a>01062 {
- <a name="l01063"></a>01063 printf(<span class="stringliteral">"BMI Size = %d\n"</span>,<a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#acfe239d5fa92bc82701fafaf72efcacf">Size</a>);
- <a name="l01064"></a>01064 printf(<span class="stringliteral">"BMI Width = %d\n"</span>,<a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a6486fcb19864264947f29b30c5a1d6e9">Width</a>);
- <a name="l01065"></a>01065 printf(<span class="stringliteral">"BMI Height = %d\n"</span>,<a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a52746e7d2f7de61866c6a2217083d1a5">Height</a>);
- <a name="l01066"></a>01066 printf(<span class="stringliteral">"BMI Planes = %d\n"</span>,<a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a29b39d5bd71bb03b8b09b0de1a4b9c8d">Planes</a>);
- <a name="l01067"></a>01067 printf(<span class="stringliteral">"BMI Count = %d\n"</span>,<a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a116a68a16b53430a1a9f0bdf657e53c8">Count</a>);
- <a name="l01068"></a>01068 printf(<span class="stringliteral">"BMI ClrUsed = %d\n"</span>,<a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a8f8f9ef7e30ba0653ba479b28676c3ce">ClrUsed</a>);
- <a name="l01069"></a>01069 printf(<span class="stringliteral">"Pad Bytes = %d\n"</span>,PadBytes);
- <a name="l01070"></a>01070 printf(<span class="stringliteral">"ScreenD= %d\n"</span>,ScreenD);
- <a name="l01071"></a>01071 }
- <a name="l01072"></a>01072
- <a name="l01073"></a>01073 PicBytes = (bpp * <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a6486fcb19864264947f29b30c5a1d6e9">Width</a> + PadBytes) * <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a52746e7d2f7de61866c6a2217083d1a5">Height</a>;
- <a name="l01074"></a>01074 ImgBytes = 4 * PadWidth * <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a52746e7d2f7de61866c6a2217083d1a5">Height</a>;
- <a name="l01075"></a>01075 ei-><a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a> = calloc(ImgBytes,1);
- <a name="l01076"></a>01076 BuffImageData = malloc(PicBytes);
- <a name="l01077"></a>01077 n = fread(BuffImageData,PicBytes,1,fp);
- <a name="l01078"></a>01078 fclose(fp);
- <a name="l01079"></a>01079
- <a name="l01080"></a>01080 ei-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a> = XCreateImage(display,CopyFromParent,ScreenD,ZPixmap,0,
- <a name="l01081"></a>01081 ei-><a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a>,PadWidth,<a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a52746e7d2f7de61866c6a2217083d1a5">Height</a>,8,0);
- <a name="l01082"></a>01082
- <a name="l01083"></a>01083 <span class="keywordflow">for</span> (y = 0 ; y < <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a52746e7d2f7de61866c6a2217083d1a5">Height</a> ; ++y)
- <a name="l01084"></a>01084 <span class="keywordflow">for</span> (x = 0 ; x < <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a6486fcb19864264947f29b30c5a1d6e9">Width</a> ; ++x)
- <a name="l01085"></a>01085 {
- <a name="l01086"></a>01086 i = bpp * x + (<a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a52746e7d2f7de61866c6a2217083d1a5">Height</a> - 1 - y) * (<a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a6486fcb19864264947f29b30c5a1d6e9">Width</a>*bpp+PadBytes);
- <a name="l01087"></a>01087 r = BuffImageData[i ];
- <a name="l01088"></a>01088 g = BuffImageData[i+1];
- <a name="l01089"></a>01089 b = BuffImageData[i+2];
- <a name="l01090"></a>01090 XPutPixel(ei-><a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>, x, y, <a class="code" href="pumax_8c.html#a6abc2b45ddd56d2171e775e89537fc04">create_pixel</a>(r,g,b));
- <a name="l01091"></a>01091 }
- <a name="l01092"></a>01092 free(BuffImageData);
- <a name="l01093"></a>01093 ei-><a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a> = <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a6486fcb19864264947f29b30c5a1d6e9">Width</a>;
- <a name="l01094"></a>01094 ei-><a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a> = <a class="code" href="pumax_8c.html#a6691345cd489f9044e316a74186ba47f">ImageBMI</a>.<a class="code" href="struct_b_m_istruct.html#a52746e7d2f7de61866c6a2217083d1a5">Height</a>;
- <a name="l01095"></a>01095 }
- <a name="l01096"></a>01096
- <a name="l01097"></a>01097
- <a name="l01098"></a><a class="code" href="pumax_8c.html#a9a77522ccd12c4a90555384a383b8537">01098</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a9a77522ccd12c4a90555384a383b8537">ntocdat</a>(<span class="keywordtype">void</span>)
- <a name="l01099"></a>01099 {
- <a name="l01100"></a>01100 <span class="keywordflow">if</span> (ndatim[1] > 0)
- <a name="l01101"></a>01101 {
- <a name="l01102"></a>01102 <span class="keywordflow">if</span> (ndatim[5] >= 0)
- <a name="l01103"></a>01103 sprintf(datch,<span class="stringliteral">"%s %2d-%s-%04d %2d:%02d"</span>,wena[ndatim[5]],ndatim[2],mona[ndatim[1]-1],
- <a name="l01104"></a>01104 ndatim[0],ndatim[3],ndatim[4]);
- <a name="l01105"></a>01105 <span class="keywordflow">else</span>
- <a name="l01106"></a>01106 sprintf(datch,<span class="stringliteral">"%2d-%s-%04d %2d:%02d"</span>,ndatim[2],mona[ndatim[1]-1],
- <a name="l01107"></a>01107 ndatim[0],ndatim[3],ndatim[4]);
- <a name="l01108"></a>01108 }
- <a name="l01109"></a>01109 }
- <a name="l01110"></a>01110
- <a name="l01111"></a>01111 <span class="comment">/* ============================================== */</span>
- <a name="l01112"></a>01112 <span class="comment">/* CharAlloc - Allocate space for character array */</span>
- <a name="l01113"></a>01113 <span class="comment">/* ============================================== */</span>
- <a name="l01114"></a>01114
- <a name="l01115"></a><a class="code" href="pumax_8c.html#af4c16744d5918311b39441909c66c69c">01115</a> <span class="keywordtype">char</span> *<a class="code" href="pumax_8c.html#af4c16744d5918311b39441909c66c69c">CharAlloc</a>(<span class="keywordtype">int</span> bytes,<span class="keywordtype">char</span> *array_name)
- <a name="l01116"></a>01116 {
- <a name="l01117"></a>01117 <span class="keywordtype">char</span> *result = NULL;
- <a name="l01118"></a>01118 <span class="keywordflow">if</span> (bytes > 0)
- <a name="l01119"></a>01119 {
- <a name="l01120"></a>01120 result = (<span class="keywordtype">char</span> *)calloc(bytes, <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>));
- <a name="l01121"></a>01121 <span class="keywordflow">if</span> (!result || <a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>)
- <a name="l01122"></a>01122 {
- <a name="l01123"></a>01123 <span class="keywordflow">if</span> (!result) printf(<span class="stringliteral">"*** Out of Memory *** on "</span>);
- <a name="l01124"></a>01124 printf(<span class="stringliteral">"CharAlloc: at%10p %6d char for %-30.30s\n"</span>,
- <a name="l01125"></a>01125 result,bytes,array_name);
- <a name="l01126"></a>01126 }
- <a name="l01127"></a>01127 }
- <a name="l01128"></a>01128 <span class="keywordflow">return</span>(result);
- <a name="l01129"></a>01129 }
- <a name="l01130"></a>01130
- <a name="l01131"></a>01131 <span class="comment">/* ======================================= */</span>
- <a name="l01132"></a>01132 <span class="comment">/* IntAlloc - Allocate space for int array */</span>
- <a name="l01133"></a>01133 <span class="comment">/* ======================================= */</span>
- <a name="l01134"></a>01134
- <a name="l01135"></a><a class="code" href="pumax_8c.html#a97eea41da1321e51271d6dd6c42219cb">01135</a> <span class="keywordtype">int</span> *<a class="code" href="pumax_8c.html#a97eea41da1321e51271d6dd6c42219cb">IntAlloc</a>(<span class="keywordtype">int</span> words,<span class="keywordtype">char</span> *array_name)
- <a name="l01136"></a>01136 {
- <a name="l01137"></a>01137 <span class="keywordtype">int</span> *result = NULL;
- <a name="l01138"></a>01138 <span class="keywordflow">if</span> (words > 0)
- <a name="l01139"></a>01139 {
- <a name="l01140"></a>01140 result = (<span class="keywordtype">int</span> *) calloc(words, <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>));
- <a name="l01141"></a>01141 <span class="keywordflow">if</span> (!result || <a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>)
- <a name="l01142"></a>01142 {
- <a name="l01143"></a>01143 <span class="keywordflow">if</span> (!result) printf(<span class="stringliteral">"*** Out of Memory *** on "</span>);
- <a name="l01144"></a>01144 printf(<span class="stringliteral">"IntAlloc: at%10p %6d int for %s\n"</span>,
- <a name="l01145"></a>01145 result,words,array_name);
- <a name="l01146"></a>01146 }
- <a name="l01147"></a>01147 }
- <a name="l01148"></a>01148 <span class="keywordflow">return</span>(result);
- <a name="l01149"></a>01149 }
- <a name="l01150"></a>01150
- <a name="l01151"></a>01151 <span class="comment">/* =========================================== */</span>
- <a name="l01152"></a>01152 <span class="comment">/* FloatAlloc - Allocate space for float array */</span>
- <a name="l01153"></a>01153 <span class="comment">/* =========================================== */</span>
- <a name="l01154"></a>01154
- <a name="l01155"></a><a class="code" href="pumax_8c.html#a2ec2314ef785dc1cddc562590cd034ad">01155</a> <span class="keywordtype">float</span> *<a class="code" href="pumax_8c.html#a2ec2314ef785dc1cddc562590cd034ad">FloatAlloc</a>(<span class="keywordtype">int</span> words, <span class="keywordtype">char</span> *array_name)
- <a name="l01156"></a>01156 {
- <a name="l01157"></a>01157 <span class="keywordtype">float</span> *result = NULL;
- <a name="l01158"></a>01158 <span class="keywordflow">if</span> (words > 0)
- <a name="l01159"></a>01159 {
- <a name="l01160"></a>01160 result = (<span class="keywordtype">float</span> *) calloc(words, <span class="keyword">sizeof</span>(<span class="keywordtype">float</span>));
- <a name="l01161"></a>01161 <span class="keywordflow">if</span> (!result || <a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>)
- <a name="l01162"></a>01162 {
- <a name="l01163"></a>01163 <span class="keywordflow">if</span> (!result) printf(<span class="stringliteral">"*** Out of Memory *** on "</span>);
- <a name="l01164"></a>01164 printf(<span class="stringliteral">"FloatAlloc: at%10p %6d float for %s\n"</span>,
- <a name="l01165"></a>01165 result,words,array_name);
- <a name="l01166"></a>01166 }
- <a name="l01167"></a>01167 }
- <a name="l01168"></a>01168 <span class="keywordflow">return</span>(result);
- <a name="l01169"></a>01169 }
- <a name="l01170"></a>01170
- <a name="l01171"></a>01171 <span class="comment">/* ========================================== */</span>
- <a name="l01172"></a>01172 <span class="comment">/* SizeAlloc - Allocate space for sized array */</span>
- <a name="l01173"></a>01173 <span class="comment">/* ========================================== */</span>
- <a name="l01174"></a>01174
- <a name="l01175"></a><a class="code" href="pumax_8c.html#aa507b1280c95bd8fb1d42c60d91e02ff">01175</a> <span class="keywordtype">void</span> *<a class="code" href="pumax_8c.html#aa507b1280c95bd8fb1d42c60d91e02ff">SizeAlloc</a>(<span class="keywordtype">int</span> words, <span class="keywordtype">int</span> Size, <span class="keywordtype">char</span> *array_name)
- <a name="l01176"></a>01176 {
- <a name="l01177"></a>01177 <span class="keywordtype">void</span> *result = NULL;
- <a name="l01178"></a>01178 <span class="keywordflow">if</span> (words > 0)
- <a name="l01179"></a>01179 {
- <a name="l01180"></a>01180 result = (<span class="keywordtype">void</span> *) calloc(words, Size);
- <a name="l01181"></a>01181 <span class="keywordflow">if</span> (!result || <a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>)
- <a name="l01182"></a>01182 {
- <a name="l01183"></a>01183 <span class="keywordflow">if</span> (!result) printf(<span class="stringliteral">"*** Out of Memory *** on "</span>);
- <a name="l01184"></a>01184 printf(<span class="stringliteral">"SizeAlloc: at%10p %6d void for %s\n"</span>,
- <a name="l01185"></a>01185 result,words,array_name);
- <a name="l01186"></a>01186 }
- <a name="l01187"></a>01187 }
- <a name="l01188"></a>01188 <span class="keywordflow">return</span>(result);
- <a name="l01189"></a>01189 }
- <a name="l01190"></a>01190
- <a name="l01191"></a><a class="code" href="pumax_8c.html#a51c0b8738867e745ec3ebd94e879f08f">01191</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a51c0b8738867e745ec3ebd94e879f08f">LoadFonts</a>(<span class="keywordtype">void</span>)
- <a name="l01192"></a>01192 {
- <a name="l01193"></a>01193 <span class="keywordflow">if</span> ((FixFont = XLoadQueryFont(display,FixFontName)) == NULL)
- <a name="l01194"></a>01194 {
- <a name="l01195"></a>01195 printf(<span class="stringliteral">"%s: Cannot open %s font\n"</span>,progname,FixFontName);
- <a name="l01196"></a>01196 exit(-1);
- <a name="l01197"></a>01197 }
- <a name="l01198"></a>01198 <span class="keywordflow">if</span> ((SubFont = XLoadQueryFont(display,SubFontName)) == NULL)
- <a name="l01199"></a>01199 {
- <a name="l01200"></a>01200 SubFont = <a class="code" href="pumax_8c.html#aa665023c2263df19f760e32916bc9e42">FixFont</a>;
- <a name="l01201"></a>01201 }
- <a name="l01202"></a>01202 <span class="keywordflow">if</span> ((BigFont = XLoadQueryFont(display,BigFontName)) == NULL)
- <a name="l01203"></a>01203 {
- <a name="l01204"></a>01204 <span class="keywordflow">if</span> ((BigFont = XLoadQueryFont(display,<span class="stringliteral">"10x20"</span>)) == NULL)
- <a name="l01205"></a>01205 {
- <a name="l01206"></a>01206 printf(<span class="stringliteral">"%s: Cannot open %s font\n"</span>,progname,BigFontName);
- <a name="l01207"></a>01207 exit(-1);
- <a name="l01208"></a>01208 }
- <a name="l01209"></a>01209 }
- <a name="l01210"></a>01210 FixFontWidth = XTextWidth(FixFont,<span class="stringliteral">"X"</span>,1);
- <a name="l01211"></a>01211 SubFontWidth = XTextWidth(SubFont,<span class="stringliteral">"X"</span>,1);
- <a name="l01212"></a>01212 BigFontWidth = XTextWidth(BigFont,<span class="stringliteral">"X"</span>,1);
- <a name="l01213"></a>01213 FixFontHeight = FixFont->ascent + FixFont->descent;
- <a name="l01214"></a>01214 SubFontHeight = SubFont->ascent + SubFont->descent;
- <a name="l01215"></a>01215 BigFontHeight = BigFont->ascent + BigFont->descent;
- <a name="l01216"></a>01216 }
- <a name="l01217"></a>01217
- <a name="l01218"></a><a class="code" href="pumax_8c.html#a77c9c27e1c3052a37c3cb275828ae40d">01218</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a77c9c27e1c3052a37c3cb275828ae40d">AllocateColorCells</a>(<span class="keyword">struct</span> <a class="code" href="struct_color_strip.html">ColorStrip</a> cs[])
- <a name="l01219"></a>01219 {
- <a name="l01220"></a>01220 <span class="keywordtype">int</span> i = 0;
- <a name="l01221"></a>01221 XColor <a class="code" href="pumax_8c.html#a9977d5ab51b6b525c34f9730753798e0">xcolor1</a>,<a class="code" href="pumax_8c.html#a4cd38c53dcf67c955c7cb4e4d35c0423">xcolor2</a>;
- <a name="l01222"></a>01222
- <a name="l01223"></a>01223 <span class="keywordflow">while</span> (cs[i].Name)
- <a name="l01224"></a>01224 {
- <a name="l01225"></a>01225 XAllocNamedColor(display,colormap,cs[i].Name,&xcolor1,&xcolor2);
- <a name="l01226"></a>01226 cs[i].<a class="code" href="struct_color_strip.html#ab1a6137a580d2a1817f4d8e127d4743c">pixel</a> = xcolor1.pixel;
- <a name="l01227"></a>01227 ++i;
- <a name="l01228"></a>01228 }
- <a name="l01229"></a>01229 <span class="keywordflow">return</span> i;
- <a name="l01230"></a>01230 }
- <a name="l01231"></a>01231
- <a name="l01232"></a><a class="code" href="pumax_8c.html#ade32a2443eb96bdf5e02320868703e0f">01232</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#ade32a2443eb96bdf5e02320868703e0f">CalcButtonAreas</a>(<span class="keywordtype">void</span>)
- <a name="l01233"></a>01233 {
- <a name="l01234"></a>01234 <span class="keywordtype">int</span> of,ds,bh,fh,fw,j;
- <a name="l01235"></a>01235
- <a name="l01236"></a>01236 of = <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01237"></a>01237 ds = 10;
- <a name="l01238"></a>01238 bh = 30;
- <a name="l01239"></a>01239 fh = <a class="code" href="pumax_8c.html#a1d2254b4c4eccb72efc38d231910fe68">BigFontHeight</a>;
- <a name="l01240"></a>01240 fw = <a class="code" href="pumax_8c.html#aefafab89c009b3e4258f1216ae91e76c">BigFontWidth</a>;
- <a name="l01241"></a>01241
- <a name="l01242"></a>01242 <span class="comment">/* 1. Stop Button */</span>
- <a name="l01243"></a>01243
- <a name="l01244"></a>01244 StopButton[0].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01245"></a>01245 StopButton[1].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01246"></a>01246 StopButton[2].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01247"></a>01247 StopButton[3].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01248"></a>01248
- <a name="l01249"></a>01249 Stop_XL = ds;
- <a name="l01250"></a>01250 Stop_XH = Stop_XL + bh;
- <a name="l01251"></a>01251 Stop_YL = of + ds;
- <a name="l01252"></a>01252 Stop_YH = Stop_YL + bh;
- <a name="l01253"></a>01253
- <a name="l01254"></a>01254 <span class="comment">/* 2. Start Button */</span>
- <a name="l01255"></a>01255
- <a name="l01256"></a>01256 Start_XL = Stop_XH + ds;
- <a name="l01257"></a>01257 Start_XH = Start_XL + bh;
- <a name="l01258"></a>01258 Start_YL = <a class="code" href="pumax_8c.html#a91b3c0f8c4770ad36e64106a0aebc691">Stop_YL</a>;
- <a name="l01259"></a>01259 Start_YH = <a class="code" href="pumax_8c.html#a8e6314067e8a239ee1389b87e06d60d6">Stop_YH</a>;
- <a name="l01260"></a>01260
- <a name="l01261"></a>01261 StartButton[0].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01262"></a>01262 StartButton[1].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01263"></a>01263 StartButton[2].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01264"></a>01264
- <a name="l01265"></a>01265 <span class="comment">/* 3. Pause Button */</span>
- <a name="l01266"></a>01266
- <a name="l01267"></a>01267 Pause_XL = Start_XH + 15;
- <a name="l01268"></a>01268 Pause_XH = Start_XH + 35;
- <a name="l01269"></a>01269 Pause_YL = <a class="code" href="pumax_8c.html#aa6b7da43e548f98c9c0a1aa042955e53">Start_YL</a>;
- <a name="l01270"></a>01270 Pause_YH = <a class="code" href="pumax_8c.html#ad7f26c40f9aa636fc053415fa4a49649">Start_YH</a>;
- <a name="l01271"></a>01271
- <a name="l01272"></a>01272 PauseButton1[0].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01273"></a>01273 PauseButton1[1].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01274"></a>01274 PauseButton1[2].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01275"></a>01275 PauseButton1[3].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01276"></a>01276
- <a name="l01277"></a>01277 PauseButton2[0].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01278"></a>01278 PauseButton2[1].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01279"></a>01279 PauseButton2[2].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01280"></a>01280 PauseButton2[3].y += <a class="code" href="pumax_8c.html#af92a559968f024eaf3b09e93db8c4ac3">OffsetY</a>;
- <a name="l01281"></a>01281
- <a name="l01282"></a>01282 <span class="comment">/* 4. Help Button */</span>
- <a name="l01283"></a>01283
- <a name="l01284"></a>01284 Help_XL = 200;
- <a name="l01285"></a>01285 Help_XH = Help_XL + 5 * fw;
- <a name="l01286"></a>01286 Help_YL = <a class="code" href="pumax_8c.html#a62f16cafe798c067ab8a6effb26b21c2">Pause_YL</a>;
- <a name="l01287"></a>01287 Help_YH = <a class="code" href="pumax_8c.html#a335dc1da623733cdc46be9818f7faeb5">Pause_YH</a>;
- <a name="l01288"></a>01288
- <a name="l01289"></a>01289 <span class="comment">/* 5. Minus & FBWD Button */</span>
- <a name="l01290"></a>01290
- <a name="l01291"></a>01291 Minus_XL = 300;
- <a name="l01292"></a>01292 Minus_XH = Minus_XL + fh;
- <a name="l01293"></a>01293 Minus_YL = Pause_YL + (bh - fh) / 2;
- <a name="l01294"></a>01294 Minus_YH = Minus_YL + fh;
- <a name="l01295"></a>01295
- <a name="l01296"></a>01296 FBWD_XH = Minus_XL - ds/2;
- <a name="l01297"></a>01297 FBWD_XL = FBWD_XH - fh;
- <a name="l01298"></a>01298 FBWD_YL = <a class="code" href="pumax_8c.html#a8eed85ad2425df37d1a278571e0e2268">Minus_YL</a>;
- <a name="l01299"></a>01299 FBWD_YH = <a class="code" href="pumax_8c.html#a9f064372aac5b9c6646ae41c1366dd67">Minus_YH</a>;
- <a name="l01300"></a>01300
- <a name="l01301"></a>01301 <span class="comment">/* 6. Parameter Change Area */</span>
- <a name="l01302"></a>01302
- <a name="l01303"></a>01303 Parc_XL = Minus_XH + ds;
- <a name="l01304"></a>01304 Parc_XH = Parc_XL + fw * 14;
- <a name="l01305"></a>01305 Parc_YL = <a class="code" href="pumax_8c.html#a8eed85ad2425df37d1a278571e0e2268">Minus_YL</a>;
- <a name="l01306"></a>01306 Parc_YH = <a class="code" href="pumax_8c.html#a9f064372aac5b9c6646ae41c1366dd67">Minus_YH</a>;
- <a name="l01307"></a>01307 Parc_XD = Parc_XH - <a class="code" href="pumax_8c.html#ae373f8d537ec4fe119fa2f056a1026b6">Parc_XL</a>;
- <a name="l01308"></a>01308 Parc_YD = Parc_YH - <a class="code" href="pumax_8c.html#ae13ffbf97704d055020c491c4e74ff0f">Parc_YL</a>;
- <a name="l01309"></a>01309
- <a name="l01310"></a>01310 <span class="comment">/* 7. Plus & FFWD Button */</span>
- <a name="l01311"></a>01311
- <a name="l01312"></a>01312 Plus_XL = Parc_XH + ds;
- <a name="l01313"></a>01313 Plus_XH = Plus_XL + fh;
- <a name="l01314"></a>01314 Plus_YL = <a class="code" href="pumax_8c.html#a8eed85ad2425df37d1a278571e0e2268">Minus_YL</a>;
- <a name="l01315"></a>01315 Plus_YH = <a class="code" href="pumax_8c.html#a9f064372aac5b9c6646ae41c1366dd67">Minus_YH</a>;
- <a name="l01316"></a>01316
- <a name="l01317"></a>01317 FFWD_XL = Plus_XH + ds/2;
- <a name="l01318"></a>01318 FFWD_XH = FFWD_XL + fh;
- <a name="l01319"></a>01319 FFWD_YL = <a class="code" href="pumax_8c.html#ad45d3847d400c8c39d830bd219eee39f">Plus_YL</a>;
- <a name="l01320"></a>01320 FFWD_YH = <a class="code" href="pumax_8c.html#a6a42672cdcc2c6cca8c6d3670fecd7c3">Plus_YH</a>;
- <a name="l01321"></a>01321
- <a name="l01322"></a>01322 <span class="comment">/* 8. Grid on/off box */</span>
- <a name="l01323"></a>01323
- <a name="l01324"></a>01324 Grid_XL = <a class="code" href="pumax_8c.html#ad24990368c579bb1864cbc8c3ce3e721">Stop_XL</a>;
- <a name="l01325"></a>01325 Grid_XH = Grid_XL + <a class="code" href="pumax_8c.html#add5a8c33565a2bbcf55996cccc7a434b">FixFontHeight</a>;
- <a name="l01326"></a>01326 Grid_YL = Stop_YH + 3 * BigFontHeight / 2;
- <a name="l01327"></a>01327 Grid_YH = Grid_YL + <a class="code" href="pumax_8c.html#add5a8c33565a2bbcf55996cccc7a434b">FixFontHeight</a>;
- <a name="l01328"></a>01328
- <a name="l01329"></a>01329 <span class="comment">/* Window status and select boxes */</span>
- <a name="l01330"></a>01330
- <a name="l01331"></a>01331 Wbox_XL = 580;
- <a name="l01332"></a>01332 Wbox_XH = Wbox_XL + <a class="code" href="pumax_8c.html#add5a8c33565a2bbcf55996cccc7a434b">FixFontHeight</a>;
- <a name="l01333"></a>01333 Wbox_YL = 0;
- <a name="l01334"></a>01334 Wbox_YH = NumWin * <a class="code" href="pumax_8c.html#add5a8c33565a2bbcf55996cccc7a434b">FixFontHeight</a>;
- <a name="l01335"></a>01335 }
- <a name="l01336"></a>01336
- <a name="l01337"></a>01337
- <a name="l01338"></a>01338 <span class="comment">/* Hack for getting information of window decoration */</span>
- <a name="l01339"></a>01339 <span class="comment">/* especially borderwidth and titleheight */</span>
- <a name="l01340"></a>01340 <span class="comment">/* These are properties of the window manager and are */</span>
- <a name="l01341"></a>01341 <span class="comment">/* usually adjustable by the user */</span>
- <a name="l01342"></a>01342
- <a name="l01343"></a><a class="code" href="pumax_8c.html#abdb502e8465c0ed1996a3a53e2919a22">01343</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#abdb502e8465c0ed1996a3a53e2919a22">TestWindow</a>(<span class="keywordtype">int</span> xx, <span class="keywordtype">int</span> yy, <span class="keywordtype">int</span> wi, <span class="keywordtype">int</span> he, <span class="keywordtype">int</span> *x, <span class="keywordtype">int</span> *y,
- <a name="l01344"></a>01344 <span class="keywordtype">int</span> *<a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>, <span class="keywordtype">int</span> *Y, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *W, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *H)
- <a name="l01345"></a>01345 {
- <a name="l01346"></a>01346 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> DepthReturn = 0;
- <a name="l01347"></a>01347 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> BorderReturn = 0;
- <a name="l01348"></a>01348 Window TW,Parent,Child;
- <a name="l01349"></a>01349
- <a name="l01350"></a>01350 TW = XCreateWindow(display,RootWindow(display,screen_num),
- <a name="l01351"></a>01351 xx,yy,wi,he, <span class="comment">// x,y,w,h</span>
- <a name="l01352"></a>01352 0,CopyFromParent,InputOutput, <span class="comment">// border, depth, class</span>
- <a name="l01353"></a>01353 CopyFromParent,0,NULL); <span class="comment">// visual, valuemask, attributes</span>
- <a name="l01354"></a>01354 XSelectInput(display,TW,ExposureMask);
- <a name="l01355"></a>01355 XMapWindow(display,TW);
- <a name="l01356"></a>01356 XMoveWindow(display,TW,xx,yy);
- <a name="l01357"></a>01357 XNextEvent(display,&CowEvent); <span class="comment">// Wait until WM mapped it</span>
- <a name="l01358"></a>01358 XGetGeometry(display,TW,&Parent,x,y,W,H,&BorderReturn,&DepthReturn);
- <a name="l01359"></a>01359 XTranslateCoordinates(display,TW,Parent,0,0,X,Y,&Child);
- <a name="l01360"></a>01360 XDestroyWindow(display,TW);
- <a name="l01361"></a>01361
- <a name="l01362"></a>01362 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>)
- <a name="l01363"></a>01363 {
- <a name="l01364"></a>01364 printf(<span class="stringliteral">"TW[%x][%x]: %4d / %4d %4d x %4d x %2d [%2d:%2d]\n"</span>,
- <a name="l01365"></a>01365 (<span class="keywordtype">int</span>)TW,(<span class="keywordtype">int</span>)Parent,*x,*y,*W,*H,DepthReturn,*X,*Y);
- <a name="l01366"></a>01366 }
- <a name="l01367"></a>01367 }
- <a name="l01368"></a>01368
- <a name="l01369"></a>01369
- <a name="l01370"></a><a class="code" href="pumax_8c.html#a12ad38f5f4aa5d1e7bce98e305662e3b">01370</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a12ad38f5f4aa5d1e7bce98e305662e3b">CreateTestWindow</a>(<span class="keywordtype">void</span>)
- <a name="l01371"></a>01371 {
- <a name="l01372"></a>01372 <span class="keywordtype">int</span> <a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>,Y,xp,yp;
- <a name="l01373"></a>01373 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> W,H;
- <a name="l01374"></a>01374
- <a name="l01375"></a>01375 <span class="comment">// Open a test window with displacement x = 100 and y = 100</span>
- <a name="l01376"></a>01376 <span class="comment">// Test the returned coordinates for upper left corner</span>
- <a name="l01377"></a>01377 <span class="comment">// and compute left margin (border) and top margin (title bar)</span>
- <a name="l01378"></a>01378
- <a name="l01379"></a>01379 <a class="code" href="pumax_8c.html#abdb502e8465c0ed1996a3a53e2919a22">TestWindow</a>(100,100,100,100,&xp,&yp,&X,&Y,&W,&H);
- <a name="l01380"></a>01380
- <a name="l01381"></a>01381 <span class="comment">// Left margin</span>
- <a name="l01382"></a>01382
- <a name="l01383"></a>01383 <span class="keywordflow">if</span> (X >= 100 && X < 110) WinLM = X - 100;
- <a name="l01384"></a>01384
- <a name="l01385"></a>01385 <span class="comment">// Right margin</span>
- <a name="l01386"></a>01386
- <a name="l01387"></a>01387 WinRM = <a class="code" href="pumax_8c.html#a0a8a8622ae71c04112e4e0d9ccda7817">WinLM</a>;
- <a name="l01388"></a>01388
- <a name="l01389"></a>01389 <span class="comment">// Top margin</span>
- <a name="l01390"></a>01390
- <a name="l01391"></a>01391 <span class="keywordflow">if</span> (Y >= 100 && Y < 150) WinTM = Y - 100;
- <a name="l01392"></a>01392 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Y > 0 && Y < 50) WinTM = Y;
- <a name="l01393"></a>01393
- <a name="l01394"></a>01394 <span class="comment">// Bottom margin</span>
- <a name="l01395"></a>01395
- <a name="l01396"></a>01396 WinBM = <a class="code" href="pumax_8c.html#a0a8a8622ae71c04112e4e0d9ccda7817">WinLM</a>;
- <a name="l01397"></a>01397
- <a name="l01398"></a>01398 <span class="comment">// Open a full screen test window</span>
- <a name="l01399"></a>01399 <span class="comment">// Test the returned coordinates for upper left corner</span>
- <a name="l01400"></a>01400 <span class="comment">// the y displacement should be WinTM plus Windowmanager menu bar</span>
- <a name="l01401"></a>01401
- <a name="l01402"></a>01402 <a class="code" href="pumax_8c.html#abdb502e8465c0ed1996a3a53e2919a22">TestWindow</a>(0,0,ScreenW,ScreenH,&xp,&yp,&X,&Y,&W,&H);
- <a name="l01403"></a>01403
- <a name="l01404"></a>01404 <span class="comment">// Window manager menu bar on top</span>
- <a name="l01405"></a>01405
- <a name="l01406"></a>01406 <span class="keywordflow">if</span> (yp > WinTM) WM_top_area = yp - <a class="code" href="pumax_8c.html#a6529bd28fe04607bb7d71ff00a101e52">WinTM</a>;
- <a name="l01407"></a>01407
- <a name="l01408"></a>01408
- <a name="l01409"></a>01409 <span class="comment">// Last usable scan line</span>
- <a name="l01410"></a>01410
- <a name="l01411"></a>01411 ScreenBot = WM_top_area + WinTM + H;
- <a name="l01412"></a>01412 <span class="keywordflow">if</span> (ScreenBot > ScreenH) ScreenBot = <a class="code" href="pumax_8c.html#a8b8a3a3a0640d58f940680ffabe74433">ScreenH</a>;
- <a name="l01413"></a>01413
- <a name="l01414"></a>01414 <span class="comment">// Are we running on a 27" iMac :-)</span>
- <a name="l01415"></a>01415
- <a name="l01416"></a>01416 <span class="keywordflow">if</span> (ScreenW == 2560 && ScreenH > 1400) ScreenBot -= 100;
- <a name="l01417"></a>01417
- <a name="l01418"></a>01418 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>)
- <a name="l01419"></a>01419 {
- <a name="l01420"></a>01420 printf(<span class="stringliteral">"Screen = %4d x %4d x %2d\n"</span>,ScreenW,ScreenH,ScreenD);
- <a name="l01421"></a>01421 printf(<span class="stringliteral">"ScreenBot = %4d\n"</span>,ScreenBot);
- <a name="l01422"></a>01422 printf(<span class="stringliteral">"Top reserved = %4d\n"</span>,WM_top_area);
- <a name="l01423"></a>01423 printf(<span class="stringliteral">"Bot reserved = %4d\n"</span>,ScreenH-ScreenBot);
- <a name="l01424"></a>01424 printf(<span class="stringliteral">"Left margin = %4d\n"</span>,WinLM);
- <a name="l01425"></a>01425 printf(<span class="stringliteral">"Right margin = %4d\n"</span>,WinRM);
- <a name="l01426"></a>01426 printf(<span class="stringliteral">"Top margin = %4d\n"</span>,WinTM);
- <a name="l01427"></a>01427 printf(<span class="stringliteral">"Bot margin = %4d\n"</span>,WinBM);
- <a name="l01428"></a>01428 }
- <a name="l01429"></a>01429 }
- <a name="l01430"></a>01430
- <a name="l01431"></a>01431
- <a name="l01432"></a><a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">01432</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">TrimCopy</a>(<span class="keywordtype">char</span> *Trim, <span class="keywordtype">char</span> *Line, <span class="keywordtype">int</span> n)
- <a name="l01433"></a>01433 {
- <a name="l01434"></a>01434 <span class="keywordtype">int</span> <a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a>;
- <a name="l01435"></a>01435 <span class="keywordtype">char</span> *s;
- <a name="l01436"></a>01436
- <a name="l01437"></a>01437 l = strlen(Line);
- <a name="l01438"></a>01438 Line[--<a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a>] = 0; <span class="comment">// Remove linefeed</span>
- <a name="l01439"></a>01439 <span class="keywordflow">while</span> (Line[l-1] == <span class="charliteral">' '</span>) Line[--<a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a>] = 0; <span class="comment">// Remove trailing blanks</span>
- <a name="l01440"></a>01440 s = Line;
- <a name="l01441"></a>01441 <span class="keywordflow">while</span> (*s == <span class="charliteral">' '</span>) ++s; <span class="comment">// Remove leading blanks</span>
- <a name="l01442"></a>01442 strncpy(Trim,s,n);
- <a name="l01443"></a>01443 }
- <a name="l01444"></a>01444
- <a name="l01445"></a>01445
- <a name="l01446"></a><a class="code" href="pumax_8c.html#ad40ddde2f8d2265ae3fd119645f85603">01446</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ad40ddde2f8d2265ae3fd119645f85603">ReadConfig</a>(<span class="keywordtype">char</span> *filename)
- <a name="l01447"></a>01447 {
- <a name="l01448"></a>01448 FILE *fp;
- <a name="l01449"></a>01449 <span class="keywordtype">int</span> i,<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>,<a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a>,s,p;
- <a name="l01450"></a>01450 <span class="keywordtype">char</span> Line[256];
- <a name="l01451"></a>01451 <span class="keywordtype">char</span> Plot[80];
- <a name="l01452"></a>01452 <span class="keywordtype">char</span> Palette[80];
- <a name="l01453"></a>01453 <span class="keywordtype">char</span> Projection[80];
- <a name="l01454"></a>01454 <span class="keywordtype">char</span> Rotation[80];
- <a name="l01455"></a>01455 <span class="keywordtype">char</span> *t;
- <a name="l01456"></a>01456
- <a name="l01457"></a>01457 fp = fopen(filename,<span class="stringliteral">"r"</span>);
- <a name="l01458"></a>01458 <span class="keywordflow">if</span> (!fp) <span class="keywordflow">return</span> 1;
- <a name="l01459"></a>01459
- <a name="l01460"></a>01460 w = -2;
- <a name="l01461"></a>01461 s = -1;
- <a name="l01462"></a>01462 p = -1;
- <a name="l01463"></a>01463 <span class="keywordflow">while</span> (!feof(fp))
- <a name="l01464"></a>01464 {
- <a name="l01465"></a>01465 t = fgets(Line,256,fp);
- <a name="l01466"></a>01466 <span class="keywordflow">if</span> (Line[0] == <span class="charliteral">'#'</span>) <span class="keywordflow">continue</span>;
- <a name="l01467"></a>01467 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"[Window "</span> , 8) == 0) w = atoi(Line+8);
- <a name="l01468"></a>01468 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"[Control"</span> , 8) == 0) w = -1;
- <a name="l01469"></a>01469 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"[Scalar "</span> , 8) == 0) s = atoi(Line+8);
- <a name="l01470"></a>01470 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"WinRows ="</span> , 9) == 0)
- <a name="l01471"></a>01471 {
- <a name="l01472"></a>01472 WinRows = atoi(Line+9);
- <a name="l01473"></a>01473 <span class="keywordflow">if</span> (WinRows < 1) WinRows = 1;
- <a name="l01474"></a>01474 <span class="keywordflow">if</span> (WinRows > 3) WinRows = 3;
- <a name="l01475"></a>01475 NumWin = WinCols * <a class="code" href="pumax_8c.html#ab109c22b7def164d1136cb9ceb9f6819">WinRows</a>;
- <a name="l01476"></a>01476 }
- <a name="l01477"></a>01477 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"WinCols ="</span> , 9) == 0)
- <a name="l01478"></a>01478 {
- <a name="l01479"></a>01479 WinCols = atoi(Line+9);
- <a name="l01480"></a>01480 <span class="keywordflow">if</span> (WinCols < 1) WinCols = 1;
- <a name="l01481"></a>01481 <span class="keywordflow">if</span> (WinCols > 3) WinCols = 3;
- <a name="l01482"></a>01482 NumWin = WinCols * <a class="code" href="pumax_8c.html#ab109c22b7def164d1136cb9ceb9f6819">WinRows</a>;
- <a name="l01483"></a>01483 }
- <a name="l01484"></a>01484 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"[Parameter "</span> ,11) == 0)
- <a name="l01485"></a>01485 {
- <a name="l01486"></a>01486 p = atoi(Line+11);
- <a name="l01487"></a>01487 <span class="keywordflow">if</span> (p >= Parcs) Parcs = p+1;
- <a name="l01488"></a>01488 }
- <a name="l01489"></a>01489 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"Geometry:"</span>,9) == 0 && w >= 0 && w < <a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>)
- <a name="l01490"></a>01490 {
- <a name="l01491"></a>01491 sscanf(Line+9,<span class="stringliteral">"%d %d %d %d"</span>,&<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].w,&<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].<a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a>,
- <a name="l01492"></a>01492 &<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].x,&<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].y);
- <a name="l01493"></a>01493 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>].<a class="code" href="struct_win_att_struct.html#abd4485f9d84ad074c80fc4127922cb19">active</a> = 1;
- <a name="l01494"></a>01494 }
- <a name="l01495"></a>01495 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"Inactive:"</span>,9) == 0 && w >= 0 && w < <a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>)
- <a name="l01496"></a>01496 {
- <a name="l01497"></a>01497 sscanf(Line+9,<span class="stringliteral">"%d %d %d %d"</span>,&<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].w,&<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].<a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a>,
- <a name="l01498"></a>01498 &<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].x,&<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].y);
- <a name="l01499"></a>01499 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>].<a class="code" href="struct_win_att_struct.html#abd4485f9d84ad074c80fc4127922cb19">active</a> = 0;
- <a name="l01500"></a>01500 }
- <a name="l01501"></a>01501 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"Geometry:"</span>,9) == 0 && w == -1)
- <a name="l01502"></a>01502 {
- <a name="l01503"></a>01503 sscanf(Line+9,<span class="stringliteral">"%d %d %d %d"</span>,&CowW,&CowH,&CowX,&CowY);
- <a name="l01504"></a>01504 }
- <a name="l01505"></a>01505 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"Title:"</span>,6) == 0 && w >= -1 && w < <a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>)
- <a name="l01506"></a>01506 {
- <a name="l01507"></a>01507 <span class="keywordflow">if</span> (w == -1) <a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">TrimCopy</a>(PlanetName,Line+6,<span class="keyword">sizeof</span>(PlanetName)-1);
- <a name="l01508"></a>01508 <span class="keywordflow">else</span> <a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">TrimCopy</a>(WindowTitle[w]+wto,Line+6,79-wto);
- <a name="l01509"></a>01509 }
- <a name="l01510"></a>01510 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"Array:"</span>,6) == 0 && w >= 0 && w < <a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>)
- <a name="l01511"></a>01511 <a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">TrimCopy</a>(<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].array_name,Line+6,79);
- <a name="l01512"></a>01512 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"Plot:"</span>,5) == 0 && w >= 0 && w < <a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>)
- <a name="l01513"></a>01513 {
- <a name="l01514"></a>01514 <a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">TrimCopy</a>(Plot,Line+5,79);
- <a name="l01515"></a>01515 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#a834a993015b3b6e5f609501c9ada9ce7">IsoTypes</a> ; ++i)
- <a name="l01516"></a>01516 <span class="keywordflow">if</span> (!strcmp(Plot,<a class="code" href="pumax_8c.html#a521281f5e10ed8f5e4cdb50ead3b2612">IsoNames</a>[i])) <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>].<a class="code" href="struct_win_att_struct.html#ac172f6d90a125507144c20f703b4a0d4">Plot</a> = i;
- <a name="l01517"></a>01517 }
- <a name="l01518"></a>01518 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"Projection:"</span>,11) == 0 && w >= 0 && w < <a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>)
- <a name="l01519"></a>01519 {
- <a name="l01520"></a>01520 <a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">TrimCopy</a>(Projection,Line+11,79);
- <a name="l01521"></a>01521 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#a3b66883efb152a59e42802d74245ae5a">MAXMAPS</a> ; ++i)
- <a name="l01522"></a>01522 <span class="keywordflow">if</span> (!strcmp(Projection,ProNames[i])) MapPro[<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>] = i;
- <a name="l01523"></a>01523 }
- <a name="l01524"></a>01524 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"Rotation factor:"</span>,15) == 0 && w >= 0 && w < <a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>)
- <a name="l01525"></a>01525 {
- <a name="l01526"></a>01526 <a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">TrimCopy</a>(Rotation,Line+15,79);
- <a name="l01527"></a>01527 <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>].<a class="code" href="struct_map_image_struct.html#a7c3018a3883c438e08c5632a49e39c66">f</a> = atoi(Rotation);
- <a name="l01528"></a>01528 }
- <a name="l01529"></a>01529 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"Palette:"</span>,8) == 0 && w >= 0 && w < <a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a>)
- <a name="l01530"></a>01530 {
- <a name="l01531"></a>01531 <a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">TrimCopy</a>(Palette,Line+8,79);
- <a name="l01532"></a>01532 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#a51158475dcc6ea9c026070a471573cf9">PalTypes</a> ; ++i)
- <a name="l01533"></a>01533 <span class="keywordflow">if</span> (!strcmp(Palette,PalNames[i])) <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>].<a class="code" href="struct_win_att_struct.html#a75ef0752e759450856fd5967bdb36587">Palette</a> = i;
- <a name="l01534"></a>01534 }
- <a name="l01535"></a>01535
- <a name="l01536"></a>01536 <span class="comment">// Dimension for time axis</span>
- <a name="l01537"></a>01537
- <a name="l01538"></a>01538 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"DimT:"</span> ,5) == 0) DimT = atoi(Line+5);
- <a name="l01539"></a>01539
- <a name="l01540"></a>01540 <span class="comment">// Attributes of scalars for timeseries windows</span>
- <a name="l01541"></a>01541
- <a name="l01542"></a>01542 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"Name:"</span> ,5) == 0 && s >= 0 && s < <a class="code" href="pumax_8c.html#a82714a35091aa707ef0bc4c0ad18d7b2">NUMSCALARS</a>)
- <a name="l01543"></a>01543 <a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">TrimCopy</a>(TSName[s],Line+5,79);
- <a name="l01544"></a>01544 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"Sub:"</span> ,4) == 0 && s >= 0 && s < <a class="code" href="pumax_8c.html#a82714a35091aa707ef0bc4c0ad18d7b2">NUMSCALARS</a>)
- <a name="l01545"></a>01545 <a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">TrimCopy</a>(TSubsc[s],Line+4,79);
- <a name="l01546"></a>01546 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"Unit:"</span> ,5) == 0 && s >= 0 && s < <a class="code" href="pumax_8c.html#a82714a35091aa707ef0bc4c0ad18d7b2">NUMSCALARS</a>)
- <a name="l01547"></a>01547 <a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">TrimCopy</a>(TSUnit[s],Line+5,79);
- <a name="l01548"></a>01548 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"Scale:"</span>,6) == 0 && s >= 0 && s < <a class="code" href="pumax_8c.html#a82714a35091aa707ef0bc4c0ad18d7b2">NUMSCALARS</a>)
- <a name="l01549"></a>01549 <a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">TrimCopy</a>(TScale[s],Line+6,79);
- <a name="l01550"></a>01550
- <a name="l01551"></a>01551 <span class="comment">// Attributes of parameter in change menu</span>
- <a name="l01552"></a>01552
- <a name="l01553"></a>01553 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"ParName:"</span>,8) == 0 && p >= 0 && p < <a class="code" href="pumax_8c.html#a90b6c7836a1eb1537db72ccc21295413">PARCS</a>)
- <a name="l01554"></a>01554 <a class="code" href="pumax_8c.html#a328ad11792a3513df3f63cf39edd9e92">TrimCopy</a>(<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[p].Name,Line+8,6);
- <a name="l01555"></a>01555 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"ParInc:"</span> ,7) == 0 && p >= 0 && p < <a class="code" href="pumax_8c.html#a90b6c7836a1eb1537db72ccc21295413">PARCS</a>)
- <a name="l01556"></a>01556 <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[p].<a class="code" href="struct_parc_struct.html#a8228d63eefa1fb42c060ab069bcf2a1b">Inc</a> = atof(Line+7);
- <a name="l01557"></a>01557 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"ParMin:"</span> ,7) == 0 && p >= 0 && p < <a class="code" href="pumax_8c.html#a90b6c7836a1eb1537db72ccc21295413">PARCS</a>)
- <a name="l01558"></a>01558 <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[p].<a class="code" href="struct_parc_struct.html#a2a2d6960e03fa37291f0fff4402f4a38">Min</a> = atof(Line+7);
- <a name="l01559"></a>01559 <span class="keywordflow">if</span> (strncmp(Line,<span class="stringliteral">"ParMax:"</span> ,7) == 0 && p >= 0 && p < <a class="code" href="pumax_8c.html#a90b6c7836a1eb1537db72ccc21295413">PARCS</a>)
- <a name="l01560"></a>01560 <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[p].<a class="code" href="struct_parc_struct.html#a01b1f457258f82282fdeeb6d8d4fbd8b">Max</a> = atof(Line+7);
- <a name="l01561"></a>01561 <span class="keywordflow">if</span> (strcmp(<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[p].Name,<span class="stringliteral">"SELLON"</span>) == 0) <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[p].<a class="code" href="struct_parc_struct.html#a8228d63eefa1fb42c060ab069bcf2a1b">Inc</a> = 360.0 / (2.0 * <a class="code" href="pumax_8c.html#af601e2b0de5522e6f9acdf65e5c43bc2">Latitudes</a>);
- <a name="l01562"></a>01562 }
- <a name="l01563"></a>01563 fclose(fp);
- <a name="l01564"></a>01564 <span class="keywordflow">return</span> 0;
- <a name="l01565"></a>01565 }
- <a name="l01566"></a>01566
- <a name="l01567"></a>01567
- <a name="l01568"></a><a class="code" href="pumax_8c.html#a32a86742844c9c69ff991885e4519233">01568</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a32a86742844c9c69ff991885e4519233">CreateControlWindow</a>(<span class="keywordtype">void</span>)
- <a name="l01569"></a>01569 {
- <a name="l01570"></a>01570 <span class="keywordtype">int</span> <a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>,Y,W,H,B,D,x,y;
- <a name="l01571"></a>01571 <span class="keywordtype">char</span> Title1[256];
- <a name="l01572"></a>01572 <span class="keywordtype">char</span> *WinconTitle1;
- <a name="l01573"></a>01573 <span class="keywordtype">char</span> *WinconTitle3 = {<span class="stringliteral">"RUN finished - click on red stop button"</span>};
- <a name="l01574"></a>01574 Window Rootwin;
- <a name="l01575"></a>01575 Window Child;
- <a name="l01576"></a>01576
- <a name="l01577"></a>01577 strcpy(Title1,<span class="stringliteral">"Unknown model"</span>);
- <a name="l01578"></a>01578 <span class="keywordflow">if</span> (Model == 0) <span class="comment">// PUMA</span>
- <a name="l01579"></a>01579 {
- <a name="l01580"></a>01580 <span class="keywordflow">if</span> (MRpid < 0)
- <a name="l01581"></a>01581 strcpy(Title1,<span class="stringliteral">"PUMA - KlimaCampus Hamburg"</span>);
- <a name="l01582"></a>01582 <span class="keywordflow">else</span>
- <a name="l01583"></a>01583 sprintf(Title1,<span class="stringliteral">"Run %d: PUMA - KlimaCampus Hamburg"</span>,MRpid);
- <a name="l01584"></a>01584 }
- <a name="l01585"></a>01585 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Model == 1) sprintf(Title1,<span class="stringliteral">"SAM - KlimaCampus"</span>);
- <a name="l01586"></a>01586 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Model == 2)
- <a name="l01587"></a>01587 {
- <a name="l01588"></a>01588 <span class="keywordflow">if</span> (MRpid < 0)
- <a name="l01589"></a>01589 sprintf(Title1,<span class="stringliteral">"Planet Simulator (%s) - KlimaCampus"</span>,PlanetName);
- <a name="l01590"></a>01590 <span class="keywordflow">else</span>
- <a name="l01591"></a>01591 sprintf(Title1,<span class="stringliteral">"Run %d: Planet Simulator (%s) - KlimaCampus"</span>,MRpid,PlanetName);
- <a name="l01592"></a>01592 }
- <a name="l01593"></a>01593 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Model == 3) sprintf(Title1,<span class="stringliteral">"Planet Simulator / LSG - KlimaCampus"</span>);
- <a name="l01594"></a>01594 <span class="keywordflow">else</span> printf(<span class="stringliteral">"*** unknown model number %d in pumax ***\n"</span>,Model);
- <a name="l01595"></a>01595 WinconTitle1 = Title1;
- <a name="l01596"></a>01596 <span class="keywordflow">if</span> (CowW < 920 || CowW > ScreenW) CowW = 920;
- <a name="l01597"></a>01597 <span class="keywordflow">if</span> (NumWin < 5) CowH = 6 * FixFontHeight + 5;
- <a name="l01598"></a>01598 <span class="keywordflow">else</span> CowH = NumWin * FixFontHeight + 5;
- <a name="l01599"></a>01599 <span class="keywordflow">if</span> (CowX < 0 || CowX > ScreenW - CowW) CowX = (ScreenW - <a class="code" href="pumax_8c.html#a4c0dc1ddfa49f758e626fbe8e5e2259e">CowW</a>) / 2;
- <a name="l01600"></a>01600 <span class="keywordflow">if</span> (CowY < 0 || CowY > ScreenBot - CowH - WinTM - WinBM) CowY = ScreenBot - CowH - WinTM - <a class="code" href="pumax_8c.html#ad6e080222bafe5cdc477c0a8ae13d144">WinBM</a>;
- <a name="l01601"></a>01601 CowSizeHints.flags = PPosition | PSize | PMinSize | PMaxSize;
- <a name="l01602"></a>01602 CowSizeHints.min_width = <a class="code" href="pumax_8c.html#a4c0dc1ddfa49f758e626fbe8e5e2259e">CowW</a>;
- <a name="l01603"></a>01603 CowSizeHints.min_height = <a class="code" href="pumax_8c.html#a5d560d88e396adf0394249a56c20155a">CowH</a>;
- <a name="l01604"></a>01604 CowSizeHints.max_width = ScreenW - WinLM - <a class="code" href="pumax_8c.html#a261f1b75cb979500af635c616e19771d">WinRM</a>;
- <a name="l01605"></a>01605 CowSizeHints.max_height = <a class="code" href="pumax_8c.html#a5d560d88e396adf0394249a56c20155a">CowH</a>;
- <a name="l01606"></a>01606 <span class="keywordflow">if</span> (MRnum == 2 && MRpid == 1) CowX += <a class="code" href="pumax_8c.html#a47745e91e472dc647c023d88e004f6be">ScreenW</a>;
- <a name="l01607"></a>01607 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>) printf(<span class="stringliteral">"Control Window %d/%d %dx%d\n"</span>,CowX,CowY,CowW,CowH);
- <a name="l01608"></a>01608 Cow = XCreateWindow(display,RootWindow(display,screen_num), <span class="comment">// display, parent</span>
- <a name="l01609"></a>01609 CowX,CowY,CowW,CowH,
- <a name="l01610"></a>01610 BorderWidth,CopyFromParent,InputOutput, <span class="comment">// border, depth, class</span>
- <a name="l01611"></a>01611 CopyFromParent,0,NULL); <span class="comment">// visual, valuemask, attributes</span>
- <a name="l01612"></a>01612 XStringListToTextProperty(&WinconTitle1,1,&WinconName1);
- <a name="l01613"></a>01613 XStringListToTextProperty(&WinconTitle3,1,&WinconName3);
- <a name="l01614"></a>01614 XStringListToTextProperty(&PauseTitle,1,&WinconPause);
- <a name="l01615"></a>01615 XStringListToTextProperty(&ReadyTitle,1,&WinconReady);
- <a name="l01616"></a>01616 XSetWMProtocols(display,Cow,&Delwin,1);
- <a name="l01617"></a>01617 XSetWMProperties(display,Cow,&WinconName1,NULL,
- <a name="l01618"></a>01618 NULL,0,&CowSizeHints,&wm_hints,&class_hints);
- <a name="l01619"></a>01619 XSelectInput(display,Cow,ButtonPressMask | KeyPressMask | ExposureMask);
- <a name="l01620"></a>01620 XMapWindow(display,Cow);
- <a name="l01621"></a>01621 }
- <a name="l01622"></a>01622
- <a name="l01623"></a>01623
- <a name="l01624"></a><a class="code" href="pumax_8c.html#acf33d3bfa71c46444f4f80e09ee4b9c6">01624</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#acf33d3bfa71c46444f4f80e09ee4b9c6">ShowStep</a>(<span class="keywordtype">void</span>)
- <a name="l01625"></a>01625 {
- <a name="l01626"></a>01626 <span class="keywordtype">char</span> Text[80];
- <a name="l01627"></a>01627 XSetFont(display, gc, BigFont->fid);
- <a name="l01628"></a>01628 XSetForeground(display,gc,BlackPix);
- <a name="l01629"></a>01629 XSetBackground(display,gc,Grey.pixel);
- <a name="l01630"></a>01630 <a class="code" href="pumax_8c.html#a9a77522ccd12c4a90555384a383b8537">ntocdat</a>();
- <a name="l01631"></a>01631 <span class="keywordflow">if</span> (ndatim[5] == 6) XSetForeground(display,gc,Red.pixel); <span class="comment">// sunday</span>
- <a name="l01632"></a>01632 XDrawImageString(display,Cow,gc,10,BigFontHeight,datch,strlen(datch));
- <a name="l01633"></a>01633 XSetForeground(display,gc,BlackPix);
- <a name="l01634"></a>01634 <span class="keywordflow">if</span> (ShowQueue)
- <a name="l01635"></a>01635 {
- <a name="l01636"></a>01636 sprintf(Text,<span class="stringliteral">"%8d Events "</span>,XPending(display));
- <a name="l01637"></a>01637 XDrawImageString(display,Cow,gc,10,60 + BigFontHeight,Text,strlen(Text));
- <a name="l01638"></a>01638 }
- <a name="l01639"></a>01639 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (fps > 1)
- <a name="l01640"></a>01640 {
- <a name="l01641"></a>01641 <span class="keywordflow">if</span> (SkipFreq < 2) sprintf(Text,<span class="stringliteral">"%5d fps"</span>,fps);
- <a name="l01642"></a>01642 <span class="keywordflow">else</span> sprintf(Text,<span class="stringliteral">"%5d fps [%d]"</span>,fps,SkipFreq);
- <a name="l01643"></a>01643 XDrawImageString(display,Cow,gc,10,60 + BigFontHeight,Text,strlen(Text));
- <a name="l01644"></a>01644 }
- <a name="l01645"></a>01645 }
- <a name="l01646"></a>01646
- <a name="l01647"></a>01647
- <a name="l01648"></a><a class="code" href="pumax_8c.html#a885719e3af8b3d9a2a49ddbf00c9b27f">01648</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a885719e3af8b3d9a2a49ddbf00c9b27f">FormatVal</a>(<span class="keywordtype">char</span> *Name, <span class="keywordtype">float</span> V, <span class="keywordtype">char</span> *Text)
- <a name="l01649"></a>01649 {
- <a name="l01650"></a>01650 <span class="keywordtype">char</span> Format[80];
- <a name="l01651"></a>01651
- <a name="l01652"></a>01652 <span class="keywordflow">if</span> (V > 9999.9 || V < -999.9)
- <a name="l01653"></a>01653 {
- <a name="l01654"></a>01654 sprintf(Text,<span class="stringliteral">"%6.6s = *****"</span>,Name);
- <a name="l01655"></a>01655 <span class="keywordflow">return</span> strlen(Text);
- <a name="l01656"></a>01656 }
- <a name="l01657"></a>01657 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (V > 999.99 ) strcpy(Format,<span class="stringliteral">"%6.6s =%6.1f"</span>);
- <a name="l01658"></a>01658 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (V > 99.999 ) strcpy(Format,<span class="stringliteral">"%6.6s =%6.2f"</span>);
- <a name="l01659"></a>01659 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (V > 9.9999) strcpy(Format,<span class="stringliteral">"%6.6s =%6.3f"</span>);
- <a name="l01660"></a>01660 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (V > 0.0 ) strcpy(Format,<span class="stringliteral">"%6.6s =%6.4f"</span>);
- <a name="l01661"></a>01661 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (V > -9.9 ) strcpy(Format,<span class="stringliteral">"%6.6s =%6.3f"</span>);
- <a name="l01662"></a>01662 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (V > -99.9 ) strcpy(Format,<span class="stringliteral">"%6.6s =%6.2f"</span>);
- <a name="l01663"></a>01663 <span class="keywordflow">else</span> strcpy(Format,<span class="stringliteral">"%6.6s =%6.1f"</span>);
- <a name="l01664"></a>01664
- <a name="l01665"></a>01665 sprintf(Text,Format,Name,V);
- <a name="l01666"></a>01666 <span class="keywordflow">return</span> strlen(Text);
- <a name="l01667"></a>01667 }
- <a name="l01668"></a>01668
- <a name="l01669"></a>01669
- <a name="l01670"></a><a class="code" href="pumax_8c.html#a556605526426c716c92badd69589728a">01670</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a556605526426c716c92badd69589728a">ShowParcs</a>(<span class="keywordtype">void</span>)
- <a name="l01671"></a>01671 {
- <a name="l01672"></a>01672 <span class="keywordtype">char</span> Text[80];
- <a name="l01673"></a>01673 <span class="keywordtype">int</span> len;
- <a name="l01674"></a>01674 <span class="keywordtype">float</span> V;
- <a name="l01675"></a>01675
- <a name="l01676"></a>01676 XSetFont(display, gc, BigFont->fid);
- <a name="l01677"></a>01677 len = <a class="code" href="pumax_8c.html#a885719e3af8b3d9a2a49ddbf00c9b27f">FormatVal</a>(<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi].Name,<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi].Val,Text);
- <a name="l01678"></a>01678
- <a name="l01679"></a>01679 XSetBackground(display,gc,WhitePix);
- <a name="l01680"></a>01680 XSetForeground(display,gc,Red.pixel);
- <a name="l01681"></a>01681 XFillRectangle(display,Cow,gc,Minus_XL,Minus_YL,Minus_XH-Minus_XL,Minus_YH-Minus_YL);
- <a name="l01682"></a>01682 XFillRectangle(display,Cow,gc,FBWD_XL,FBWD_YL,FBWD_XH-FBWD_XL,FBWD_YH-FBWD_YL);
- <a name="l01683"></a>01683 XSetForeground(display,gc,WhitePix);
- <a name="l01684"></a>01684 XFillRectangle(display,Cow,gc,Minus_XL+3,(Minus_YH+Minus_YL)/2-1,Minus_XH-Minus_XL-5,3);
- <a name="l01685"></a>01685 XFillRectangle(display,Cow,gc,FBWD_XL+3,(FBWD_YH+FBWD_YL)/2-1,FBWD_XH-FBWD_XL-5,3);
- <a name="l01686"></a>01686 XSetForeground(display,gc,BlackPix);
- <a name="l01687"></a>01687 XDrawImageString(display,Cow,gc,Parc_XL,Parc_YH-3,Text,len);
- <a name="l01688"></a>01688 XSetForeground(display,gc,Green.pixel);
- <a name="l01689"></a>01689 XFillRectangle(display,Cow,gc,Plus_XL,Plus_YL,Plus_XH-Plus_XL,Plus_YH-Plus_YL);
- <a name="l01690"></a>01690 XFillRectangle(display,Cow,gc,FFWD_XL,FFWD_YL,FFWD_XH-FFWD_XL,FFWD_YH-FFWD_YL);
- <a name="l01691"></a>01691 XSetForeground(display,gc,WhitePix);
- <a name="l01692"></a>01692 XFillRectangle(display,Cow,gc,Plus_XL+3,(Plus_YH+Plus_YL)/2-1,Plus_XH-Plus_XL-5,3);
- <a name="l01693"></a>01693 XFillRectangle(display,Cow,gc,FFWD_XL+3,(FFWD_YH+FFWD_YL)/2-1,FFWD_XH-FFWD_XL-5,3);
- <a name="l01694"></a>01694 XFillRectangle(display,Cow,gc,(Plus_XH+Plus_XL)/2-1,Plus_YL+3,3,Plus_YH-Plus_YL-5);
- <a name="l01695"></a>01695 XFillRectangle(display,Cow,gc,(FFWD_XH+FFWD_XL)/2-1,FFWD_YL+3,3,FFWD_YH-FFWD_YL-5);
- <a name="l01696"></a>01696 XSetForeground(display,gc,BlackPix);
- <a name="l01697"></a>01697 XDrawRectangle(display,Cow,gc,Minus_XL,Minus_YL,Minus_XH-Minus_XL,Minus_YH-Minus_YL);
- <a name="l01698"></a>01698 XDrawRectangle(display,Cow,gc,FBWD_XL,FBWD_YL,FBWD_XH-FBWD_XL,FBWD_YH-FBWD_YL);
- <a name="l01699"></a>01699 XDrawRectangle(display,Cow,gc,Parc_XL-1,Parc_YL-1,Parc_XH-Parc_XL+1,Parc_YH-Parc_YL);
- <a name="l01700"></a>01700 XDrawRectangle(display,Cow,gc,Plus_XL,Plus_YL,Plus_XH-Plus_XL,Plus_YH-Plus_YL);
- <a name="l01701"></a>01701 XDrawRectangle(display,Cow,gc,FFWD_XL,FFWD_YL,FFWD_XH-FFWD_XL,FFWD_YH-FFWD_YL);
- <a name="l01702"></a>01702
- <a name="l01703"></a>01703 <span class="comment">/* Show next parameter */</span>
- <a name="l01704"></a>01704
- <a name="l01705"></a>01705 strcpy(Text,<span class="stringliteral">" "</span>);
- <a name="l01706"></a>01706 <span class="keywordflow">if</span> (cpi < Parcs-1) <a class="code" href="pumax_8c.html#a885719e3af8b3d9a2a49ddbf00c9b27f">FormatVal</a>(<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi+1].Name,<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi+1].Val,Text);
- <a name="l01707"></a>01707 len = strlen(Text);
- <a name="l01708"></a>01708
- <a name="l01709"></a>01709 XSetBackground(display,gc,WhitePix);
- <a name="l01710"></a>01710 XSetForeground(display,gc,BlackPix);
- <a name="l01711"></a>01711 XDrawImageString(display,Cow,gc,Parc_XL,2*Parc_YH-Parc_YL-3,Text,len);
- <a name="l01712"></a>01712 XDrawRectangle(display,Cow,gc,Parc_XL-1,Parc_YH-1,Parc_XH-Parc_XL+1,Parc_YH-Parc_YL);
- <a name="l01713"></a>01713
- <a name="l01714"></a>01714 <span class="comment">/* Show previous parameter */</span>
- <a name="l01715"></a>01715
- <a name="l01716"></a>01716 strcpy(Text,<span class="stringliteral">" "</span>);
- <a name="l01717"></a>01717 <span class="keywordflow">if</span> (cpi > 0) <a class="code" href="pumax_8c.html#a885719e3af8b3d9a2a49ddbf00c9b27f">FormatVal</a>(<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi-1].Name,<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi-1].Val,Text);
- <a name="l01718"></a>01718 len = strlen(Text);
- <a name="l01719"></a>01719
- <a name="l01720"></a>01720 XSetBackground(display,gc,WhitePix);
- <a name="l01721"></a>01721 XSetForeground(display,gc,BlackPix);
- <a name="l01722"></a>01722 XDrawImageString(display,Cow,gc,Parc_XL,Parc_YL-3,Text,len);
- <a name="l01723"></a>01723 XDrawRectangle(display,Cow,gc,Parc_XL-1,2*Parc_YL-Parc_YH-1,Parc_XH-Parc_XL+1,Parc_YH-Parc_YL);
- <a name="l01724"></a>01724 XSetFont(display, gc, FixFont->fid);
- <a name="l01725"></a>01725
- <a name="l01726"></a>01726 }
- <a name="l01727"></a>01727
- <a name="l01728"></a>01728
- <a name="l01729"></a><a class="code" href="pumax_8c.html#acc97da61b92440dd0e1d283db21536c0">01729</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#acc97da61b92440dd0e1d283db21536c0">CheckMark</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> <a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a>)
- <a name="l01730"></a>01730 {
- <a name="l01731"></a>01731 XDrawLine(display,Cow,gc,x+2,y+2,x+d-1,y+d-1);
- <a name="l01732"></a>01732 XDrawLine(display,Cow,gc,x+3,y+2,x+d-1,y+d-2);
- <a name="l01733"></a>01733 XDrawLine(display,Cow,gc,x+2,y+3,x+d-2,y+d-1);
- <a name="l01734"></a>01734
- <a name="l01735"></a>01735 XDrawLine(display,Cow,gc,x+d-1,y+1,x+2,y+d-2);
- <a name="l01736"></a>01736 XDrawLine(display,Cow,gc,x+d-2,y+1,x+2,y+d-3);
- <a name="l01737"></a>01737 XDrawLine(display,Cow,gc,x+d-1,y+2,x+3,y+d-2);
- <a name="l01738"></a>01738 }
- <a name="l01739"></a>01739
- <a name="l01740"></a>01740
- <a name="l01741"></a><a class="code" href="pumax_8c.html#a49d7de013de4c527a1bc7d1db4ea07d2">01741</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a49d7de013de4c527a1bc7d1db4ea07d2">ShowWindowStatus</a>(<span class="keywordtype">void</span>)
- <a name="l01742"></a>01742 {
- <a name="l01743"></a>01743 <span class="keywordtype">char</span> *cp;
- <a name="l01744"></a>01744 <span class="keywordtype">char</span> Text[80];
- <a name="l01745"></a>01745 <span class="keywordtype">int</span> len,<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>,x,<a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a>;
- <a name="l01746"></a>01746
- <a name="l01747"></a>01747 XSetFont(display, gc, FixFont->fid);
- <a name="l01748"></a>01748 XSetForeground(display,gc,BlackPix);
- <a name="l01749"></a>01749 XSetBackground(display,gc,Grey.pixel);
- <a name="l01750"></a>01750 x = <a class="code" href="pumax_8c.html#a34c9aca7c9d3e891e823db12a7521fe2">Wbox_XL</a>;
- <a name="l01751"></a>01751 d = <a class="code" href="pumax_8c.html#add5a8c33565a2bbcf55996cccc7a434b">FixFontHeight</a>;
- <a name="l01752"></a>01752 <span class="keywordflow">for</span> (w=0 ; w < <a class="code" href="pumax_8c.html#a2364498cd60ebd2201eeef32ce76e882">NumWin</a> ; ++<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>)
- <a name="l01753"></a>01753 {
- <a name="l01754"></a>01754 strncpy(Text,WindowTitle[w]+wto,40);
- <a name="l01755"></a>01755 Text[40] = 0;
- <a name="l01756"></a>01756 cp = strstr(Text,<span class="stringliteral">"Level"</span>);
- <a name="l01757"></a>01757 <span class="keywordflow">if</span> (cp) *cp = 0;
- <a name="l01758"></a>01758 cp = strstr(Text,<span class="stringliteral">"Latitude"</span>);
- <a name="l01759"></a>01759 <span class="keywordflow">if</span> (cp) *cp = 0;
- <a name="l01760"></a>01760 len = strlen(Text);
- <a name="l01761"></a>01761 XDrawImageString(display,Cow,gc,x+20,(w+1) * d,Text,len);
- <a name="l01762"></a>01762 }
- <a name="l01763"></a>01763 XSetForeground(display,gc,WhitePix);
- <a name="l01764"></a>01764 <span class="keywordflow">for</span> (w=0 ; w < <a class="code" href="pumax_8c.html#a2364498cd60ebd2201eeef32ce76e882">NumWin</a> ; ++<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>)
- <a name="l01765"></a>01765 {
- <a name="l01766"></a>01766 XFillRectangle(display,Cow,gc,x,w*d,d,d);
- <a name="l01767"></a>01767 }
- <a name="l01768"></a>01768 XSetForeground(display,gc,BlackPix);
- <a name="l01769"></a>01769 <span class="keywordflow">for</span> (w=0 ; w < <a class="code" href="pumax_8c.html#a2364498cd60ebd2201eeef32ce76e882">NumWin</a> ; ++<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>)
- <a name="l01770"></a>01770 {
- <a name="l01771"></a>01771 XDrawRectangle(display,Cow,gc,x,w*d,d,d);
- <a name="l01772"></a>01772 }
- <a name="l01773"></a>01773 <span class="keywordflow">for</span> (w=0 ; w < <a class="code" href="pumax_8c.html#a2364498cd60ebd2201eeef32ce76e882">NumWin</a> ; ++<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a>)
- <a name="l01774"></a>01774 <span class="keywordflow">if</span> (Win[w]) <a class="code" href="pumax_8c.html#acc97da61b92440dd0e1d283db21536c0">CheckMark</a>(x,w*d,d);
- <a name="l01775"></a>01775 }
- <a name="l01776"></a>01776
- <a name="l01777"></a>01777
- <a name="l01778"></a><a class="code" href="pumax_8c.html#a2ddd057b95fbe6c728ffa0675b8d079f">01778</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a2ddd057b95fbe6c728ffa0675b8d079f">ShowGridStatus</a>(<span class="keywordtype">void</span>)
- <a name="l01779"></a>01779 {
- <a name="l01780"></a>01780 <span class="keywordtype">int</span> x,y,<a class="code" href="struct_map_image_struct.html#aef0d9e2ef28e765f15559ff077d9fe26">d</a>;
- <a name="l01781"></a>01781
- <a name="l01782"></a>01782 d = <a class="code" href="pumax_8c.html#add5a8c33565a2bbcf55996cccc7a434b">FixFontHeight</a>;
- <a name="l01783"></a>01783 x = <a class="code" href="pumax_8c.html#adbf17b3e938de11e352f68acd0273ada">Grid_XL</a>;
- <a name="l01784"></a>01784 y = <a class="code" href="pumax_8c.html#af60996257395d9ddc45200ad8dd9a4ae">Grid_YL</a>;
- <a name="l01785"></a>01785 XSetFont(display, gc, FixFont->fid);
- <a name="l01786"></a>01786 XSetForeground(display,gc,BlackPix);
- <a name="l01787"></a>01787 XSetBackground(display,gc,Grey.pixel);
- <a name="l01788"></a>01788 XDrawImageString(display,Cow,gc,Grid_XH+FixFontWidth,Grid_YH,<span class="stringliteral">"Grid"</span>,4);
- <a name="l01789"></a>01789 XSetForeground(display,gc,WhitePix);
- <a name="l01790"></a>01790 XFillRectangle(display,Cow,gc,x,Grid_YL,d,d);
- <a name="l01791"></a>01791 XSetForeground(display,gc,BlackPix);
- <a name="l01792"></a>01792 XDrawRectangle(display,Cow,gc,x,Grid_YL,d,d);
- <a name="l01793"></a>01793
- <a name="l01794"></a>01794 <span class="keywordflow">if</span> (Grid) <a class="code" href="pumax_8c.html#acc97da61b92440dd0e1d283db21536c0">CheckMark</a>(x,y,d);
- <a name="l01795"></a>01795 }
- <a name="l01796"></a>01796
- <a name="l01797"></a>01797
- <a name="l01798"></a><a class="code" href="pumax_8c.html#a41f77efa657ce06e158034152384bf2e">01798</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a41f77efa657ce06e158034152384bf2e">RedrawControlWindow</a>(<span class="keywordtype">void</span>)
- <a name="l01799"></a>01799 {
- <a name="l01800"></a>01800 <span class="keywordtype">char</span> Text[80];
- <a name="l01801"></a>01801 <span class="keywordtype">int</span> status,<a class="code" href="pumax_8c.html#a90fa18336f52663513916236b6c3f633">WinXSize</a>,<a class="code" href="pumax_8c.html#a48ba2c20a7bf82da8f16252eff21155f">WinYSize</a>,font_height,width,len;
- <a name="l01802"></a>01802 <span class="keywordtype">int</span> i,j,x1,x2,y1,y2,y3;
- <a name="l01803"></a>01803 XWindowAttributes CurAtt;
- <a name="l01804"></a>01804
- <a name="l01805"></a>01805 status = XGetWindowAttributes(display,Cow,&CurAtt);
- <a name="l01806"></a>01806 WinXSize = CurAtt.width;
- <a name="l01807"></a>01807 WinYSize = CurAtt.height;
- <a name="l01808"></a>01808
- <a name="l01809"></a>01809 XSetForeground(display,gc,BlackPix);
- <a name="l01810"></a>01810 XSetBackground(display,gc,WhitePix);
- <a name="l01811"></a>01811
- <a name="l01812"></a>01812 XSetWindowBackground(display,Cow,Grey.pixel);
- <a name="l01813"></a>01813 XClearWindow(display,Cow);
- <a name="l01814"></a>01814
- <a name="l01815"></a>01815 <span class="comment">/* Red stop button */</span>
- <a name="l01816"></a>01816
- <a name="l01817"></a>01817 XSetForeground(display,gc,Red.pixel);
- <a name="l01818"></a>01818 XFillPolygon(display,Cow,gc,StopButton,4,Convex,CoordModeOrigin);
- <a name="l01819"></a>01819 XSetForeground(display,gc,WhitePix);
- <a name="l01820"></a>01820 x1 = StopButton[0].x ;
- <a name="l01821"></a>01821 y1 = StopButton[0].y ;
- <a name="l01822"></a>01822 <span class="keywordflow">for</span> (j=0 ; j < <a class="code" href="pumax_8c.html#ac94f19a0578e5b444225233739749082">PSDIM</a> ; ++j)
- <a name="l01823"></a>01823 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#ac94f19a0578e5b444225233739749082">PSDIM</a> ; ++i)
- <a name="l01824"></a>01824 <span class="keywordflow">if</span> (pixelstar[j][i] == <span class="charliteral">'*'</span>)
- <a name="l01825"></a>01825 XDrawPoint(display,Cow,gc,i+x1,j+y1);
- <a name="l01826"></a>01826
- <a name="l01827"></a>01827 XSetForeground(display,gc,LightRed.pixel);
- <a name="l01828"></a>01828 x1 = 10; x2 = 40 ; y1 = OffsetY + 10 ; y2 = OffsetY + 40;
- <a name="l01829"></a>01829 XDrawLine(display,Cow,gc,x2 ,y1-1,x2 ,y2 );
- <a name="l01830"></a>01830 XDrawLine(display,Cow,gc,x2+1,y1-2,x2+1,y2+1);
- <a name="l01831"></a>01831 XDrawLine(display,Cow,gc,x1-1,y1-1,x2 ,y1-1);
- <a name="l01832"></a>01832 XDrawLine(display,Cow,gc,x2+1,y2-2,x2+1,y1-2);
- <a name="l01833"></a>01833 XSetForeground(display,gc,DarkRed.pixel);
- <a name="l01834"></a>01834 XDrawLine(display,Cow,gc,x1-1,y1-1,x1-1,y2 );
- <a name="l01835"></a>01835 XDrawLine(display,Cow,gc,x1-2,y1-2,x1-2,y2+1);
- <a name="l01836"></a>01836 XDrawLine(display,Cow,gc,x1-1,y2 ,x2 ,y2 );
- <a name="l01837"></a>01837 XDrawLine(display,Cow,gc,x1-2,y2+1,x2+1,y2+1);
- <a name="l01838"></a>01838
- <a name="l01839"></a>01839 <span class="comment">// Green <play> button</span>
- <a name="l01840"></a>01840
- <a name="l01841"></a>01841 XSetForeground(display,gc,Green.pixel);
- <a name="l01842"></a>01842 XFillPolygon(display,Cow,gc,StartButton,3,Convex,CoordModeOrigin);
- <a name="l01843"></a>01843 x1 = 50; x2 = 80 ; y1 = OffsetY + 10 ; y2 = OffsetY + 25; y3 = OffsetY + 40;
- <a name="l01844"></a>01844 XSetForeground(display,gc,LightGreen.pixel);
- <a name="l01845"></a>01845 XDrawLine(display,Cow,gc,x1 ,y1-1,x2 ,y2 );
- <a name="l01846"></a>01846 XDrawLine(display,Cow,gc,x1 ,y1-2,x2+1,y2 );
- <a name="l01847"></a>01847 XSetForeground(display,gc,DarkGreen.pixel);
- <a name="l01848"></a>01848 XDrawLine(display,Cow,gc,x1-1,y1-1,x1-1,y3+1);
- <a name="l01849"></a>01849 XDrawLine(display,Cow,gc,x1-2,y1-2,x1-2,y3+2);
- <a name="l01850"></a>01850
- <a name="l01851"></a>01851 <span class="comment">// Blue <pause> button</span>
- <a name="l01852"></a>01852
- <a name="l01853"></a>01853 XSetForeground(display,gc,Blue.pixel);
- <a name="l01854"></a>01854 XFillPolygon(display,Cow,gc,PauseButton1,4,Convex,CoordModeOrigin);
- <a name="l01855"></a>01855 XFillPolygon(display,Cow,gc,PauseButton2,4,Convex,CoordModeOrigin);
- <a name="l01856"></a>01856
- <a name="l01857"></a>01857 x1 = 95; x2 = 102; y1 = OffsetY + 10; y2 = OffsetY + 40;
- <a name="l01858"></a>01858 XSetForeground(display,gc,DarkBlue.pixel);
- <a name="l01859"></a>01859 XDrawLine(display,Cow,gc,x1-1,y1-1,x1-1,y2 );
- <a name="l01860"></a>01860 XDrawLine(display,Cow,gc,x1-2,y1-2,x1-2,y2+1);
- <a name="l01861"></a>01861 XDrawLine(display,Cow,gc,x1-1,y2 ,x2 ,y2 );
- <a name="l01862"></a>01862 XDrawLine(display,Cow,gc,x1-2,y2+1,x2+1,y2+1);
- <a name="l01863"></a>01863 XSetForeground(display,gc,LightBlue.pixel);
- <a name="l01864"></a>01864 XDrawLine(display,Cow,gc,x2 ,y1-1,x2 ,y2 );
- <a name="l01865"></a>01865 XDrawLine(display,Cow,gc,x2+1,y1-2,x2+1,y2+1);
- <a name="l01866"></a>01866 XDrawLine(display,Cow,gc,x1-1,y1-1,x2 ,y1-1);
- <a name="l01867"></a>01867 XDrawLine(display,Cow,gc,x2+1,y2-2,x2+1,y1-2);
- <a name="l01868"></a>01868
- <a name="l01869"></a>01869 x1 = 108; x2 = 115; y1 = OffsetY + 10; y2 = OffsetY + 40;
- <a name="l01870"></a>01870 XSetForeground(display,gc,DarkBlue.pixel);
- <a name="l01871"></a>01871 XDrawLine(display,Cow,gc,x1-1,y1-1,x1-1,y2 );
- <a name="l01872"></a>01872 XDrawLine(display,Cow,gc,x1-2,y1-2,x1-2,y2+1);
- <a name="l01873"></a>01873 XDrawLine(display,Cow,gc,x1-1,y2 ,x2 ,y2 );
- <a name="l01874"></a>01874 XDrawLine(display,Cow,gc,x1-2,y2+1,x2+1,y2+1);
- <a name="l01875"></a>01875 XSetForeground(display,gc,LightBlue.pixel);
- <a name="l01876"></a>01876 XDrawLine(display,Cow,gc,x2 ,y1-1,x2 ,y2 );
- <a name="l01877"></a>01877 XDrawLine(display,Cow,gc,x2+1,y1-2,x2+1,y2+1);
- <a name="l01878"></a>01878 XDrawLine(display,Cow,gc,x1-1,y1-1,x2 ,y1-1);
- <a name="l01879"></a>01879 XDrawLine(display,Cow,gc,x2+1,y2-2,x2+1,y1-2);
- <a name="l01880"></a>01880
- <a name="l01881"></a>01881 <span class="comment">// Help button</span>
- <a name="l01882"></a>01882
- <a name="l01883"></a>01883 x1 = 200; x2 = x1 + 5 * <a class="code" href="pumax_8c.html#aefafab89c009b3e4258f1216ae91e76c">BigFontWidth</a>; y1 = OffsetY + 10; y2 = y1 + 30;
- <a name="l01884"></a>01884 XSetForeground(display,gc,Red.pixel);
- <a name="l01885"></a>01885 XFillRectangle(display,Cow,gc,x1,y1,x2-x1,y2-y1);
- <a name="l01886"></a>01886 XSetForeground(display,gc,BlackPix);
- <a name="l01887"></a>01887 XDrawRectangle(display,Cow,gc,x1-1,y1-1,x2-x1+1,y2-y1+1);
- <a name="l01888"></a>01888 XSetFont(display,gc,BigFont->fid);
- <a name="l01889"></a>01889 XSetForeground(display,gc,Yellow.pixel);
- <a name="l01890"></a>01890 XSetBackground(display,gc,Red.pixel);
- <a name="l01891"></a>01891 XDrawImageString(display,Cow,gc,x1+BigFontWidth/2,(y1+y2)/2+BigFont->ascent/2,<span class="stringliteral">"HELP"</span>,4);
- <a name="l01892"></a>01892
- <a name="l01893"></a>01893 <a class="code" href="pumax_8c.html#acf33d3bfa71c46444f4f80e09ee4b9c6">ShowStep</a>();
- <a name="l01894"></a>01894 <a class="code" href="pumax_8c.html#a556605526426c716c92badd69589728a">ShowParcs</a>();
- <a name="l01895"></a>01895 <a class="code" href="pumax_8c.html#a49d7de013de4c527a1bc7d1db4ea07d2">ShowWindowStatus</a>();
- <a name="l01896"></a>01896 <a class="code" href="pumax_8c.html#a2ddd057b95fbe6c728ffa0675b8d079f">ShowGridStatus</a>();
- <a name="l01897"></a>01897 <span class="keywordflow">return</span> 0;
- <a name="l01898"></a>01898 }
- <a name="l01899"></a>01899
- <a name="l01900"></a>01900
- <a name="l01901"></a><a class="code" href="pumax_8c.html#af2e92313aaf18974c4fa6c1cb34cd7a3">01901</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#af2e92313aaf18974c4fa6c1cb34cd7a3">ClearTracer</a>(<span class="keywordtype">void</span>)
- <a name="l01902"></a>01902 {
- <a name="l01903"></a>01903 <span class="keywordtype">int</span> j;
- <a name="l01904"></a>01904 <span class="keywordflow">for</span> (j=0 ; j < <a class="code" href="pumax_8c.html#ab5a0dcea45727946af71ece4d11e0278">MAXPAR</a> ; ++j)
- <a name="l01905"></a>01905 {
- <a name="l01906"></a>01906 pax[j] = -1.0;
- <a name="l01907"></a>01907 pay[j] = -1.0;
- <a name="l01908"></a>01908 }
- <a name="l01909"></a>01909 }
- <a name="l01910"></a>01910
- <a name="l01911"></a>01911
- <a name="l01912"></a><a class="code" href="pumax_8c.html#a03fae160cac537852ccd95f3670a339a">01912</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a03fae160cac537852ccd95f3670a339a">CheckEndianess</a>(<span class="keywordtype">void</span>)
- <a name="l01913"></a>01913 {
- <a name="l01914"></a>01914 <span class="keyword">union </span>EndianCheck
- <a name="l01915"></a>01915 {
- <a name="l01916"></a>01916 <span class="keywordtype">char</span> b[<span class="keyword">sizeof</span>(int)];
- <a name="l01917"></a>01917 <span class="keywordtype">int</span> i;
- <a name="l01918"></a>01918 } ec;
- <a name="l01919"></a>01919
- <a name="l01920"></a>01920 ec.i = 8;
- <a name="l01921"></a>01921 <span class="keywordflow">return</span> (ec.b[0] == 0);
- <a name="l01922"></a>01922 }
- <a name="l01923"></a>01923
- <a name="l01924"></a>01924
- <a name="l01925"></a><a class="code" href="pumax_8c.html#a3112b5a95104da13f9d136d080a9571a">01925</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a3112b5a95104da13f9d136d080a9571a">initgui_</a>(<span class="keywordtype">int</span> *model, <span class="keywordtype">int</span> *debug, <span class="keywordtype">int</span> *lats, <span class="keywordtype">int</span> *mrpid, <span class="keywordtype">int</span> *mrnum)
- <a name="l01926"></a>01926 {
- <a name="l01927"></a>01927 <span class="keywordtype">int</span> x,y,w,h;
- <a name="l01928"></a>01928 <span class="keywordtype">int</span> argc = 1;
- <a name="l01929"></a>01929 <span class="keywordtype">int</span> i,j;
- <a name="l01930"></a>01930 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> valuemask = 0; <span class="comment">/* ignore XGCvalues and use defaults */</span>
- <a name="l01931"></a>01931 XGCValues values;
- <a name="l01932"></a>01932 XEvent Event;
- <a name="l01933"></a>01933 <span class="keyword">struct </span>timeval TimeVal;
- <a name="l01934"></a>01934
- <a name="l01935"></a>01935 <span class="comment">// Check for big endian computer</span>
- <a name="l01936"></a>01936 <span class="comment">// The bitmap format ".bmp" ist little endian</span>
- <a name="l01937"></a>01937
- <a name="l01938"></a>01938 BigEndian = <a class="code" href="pumax_8c.html#a03fae160cac537852ccd95f3670a339a">CheckEndianess</a>();
- <a name="l01939"></a>01939
- <a name="l01940"></a>01940 <span class="comment">// Set seed for random number generator from clock</span>
- <a name="l01941"></a>01941
- <a name="l01942"></a>01942 gettimeofday(&TimeVal,NULL);
- <a name="l01943"></a>01943 Seed = TimeVal.tv_sec;
- <a name="l01944"></a>01944
- <a name="l01945"></a>01945 Model = *model;
- <a name="l01946"></a>01946 <a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a> = *debug;
- <a name="l01947"></a>01947 Latitudes = *lats;
- <a name="l01948"></a>01948 MRpid = *mrpid;
- <a name="l01949"></a>01949 MRnum = *mrnum;
- <a name="l01950"></a>01950
- <a name="l01951"></a>01951 <span class="keywordflow">if</span> (MRpid >= 0)
- <a name="l01952"></a>01952 {
- <a name="l01953"></a>01953 sprintf(wtrun,<span class="stringliteral">"[%d] "</span>,MRpid);
- <a name="l01954"></a>01954 wto = strlen(wtrun);
- <a name="l01955"></a>01955 }
- <a name="l01956"></a>01956
- <a name="l01957"></a>01957 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>) printf(<span class="stringliteral">"initgui(%d,%d)\n"</span>,Model,<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>);
- <a name="l01958"></a>01958 <span class="keywordflow">if</span> ((display=XOpenDisplay(display_name)) == NULL)
- <a name="l01959"></a>01959 {
- <a name="l01960"></a>01960 fprintf(stderr,<span class="stringliteral">"%s: cannot connect to X server %s\n"</span>,
- <a name="l01961"></a>01961 progname, XDisplayName(display_name));
- <a name="l01962"></a>01962 exit(1);
- <a name="l01963"></a>01963 }
- <a name="l01964"></a>01964 screen_num = DefaultScreen(display);
- <a name="l01965"></a>01965 ScreenD = XDefaultDepth(display,screen_num);
- <a name="l01966"></a>01966 ScreenW = DisplayWidth (display,screen_num);
- <a name="l01967"></a>01967 ScreenH = DisplayHeight(display,screen_num);
- <a name="l01968"></a>01968 BlackPix = BlackPixel(display,screen_num);
- <a name="l01969"></a>01969 WhitePix = WhitePixel(display,screen_num);
- <a name="l01970"></a>01970 SmallScreen = ScreenH <= 768;
- <a name="l01971"></a>01971 <span class="keywordflow">if</span> (SmallScreen)
- <a name="l01972"></a>01972 {
- <a name="l01973"></a>01973 WinRows = 2;
- <a name="l01974"></a>01974 NumWin = WinCols * <a class="code" href="pumax_8c.html#ab109c22b7def164d1136cb9ceb9f6819">WinRows</a>;
- <a name="l01975"></a>01975 Grid = 0;
- <a name="l01976"></a>01976 }
- <a name="l01977"></a>01977
- <a name="l01978"></a>01978 <span class="keywordflow">if</span> (MRnum == 2) ScreenW /= 2; <span class="comment">/* Run with two GUI's */</span>
- <a name="l01979"></a>01979
- <a name="l01980"></a>01980 <span class="comment">/* Fix defaults for multihead displays */</span>
- <a name="l01981"></a>01981
- <a name="l01982"></a>01982 <span class="keywordflow">if</span> (ScreenH > ScreenW && ScreenH > 1200) ScreenH = 1200;
- <a name="l01983"></a>01983 <span class="keywordflow">if</span> (ScreenW > 2 * ScreenH && ScreenW >= 2048) ScreenW /= 2;
- <a name="l01984"></a>01984
- <a name="l01985"></a>01985 <span class="keywordflow">for</span> (i = 0 ; i < <a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a> ; ++i)
- <a name="l01986"></a>01986 {
- <a name="l01987"></a>01987 WindowTitle[i] = <a class="code" href="pumax_8c.html#af4c16744d5918311b39441909c66c69c">CharAlloc</a>(256,<span class="stringliteral">"WindowTitle"</span>);
- <a name="l01988"></a>01988 <span class="keywordflow">if</span> (wto == 0) sprintf(WindowTitle[i],<span class="stringliteral">"Window %d"</span>,i+1);
- <a name="l01989"></a>01989 <span class="keywordflow">else</span> sprintf(WindowTitle[i],<span class="stringliteral">"%sWindow %d"</span>,wtrun,i+1);
- <a name="l01990"></a>01990 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].<a class="code" href="struct_win_att_struct.html#aa00d94640c9eb39ceac56f95c595f62a">x</a> = -1;
- <a name="l01991"></a>01991 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].<a class="code" href="struct_win_att_struct.html#a770cabf1d350db5890f636ccf30e5d47">y</a> = -1;
- <a name="l01992"></a>01992 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].<a class="code" href="struct_win_att_struct.html#a6e7f8041c23d41b7d2835a2b855d35f0">w</a> = -1;
- <a name="l01993"></a>01993 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].<a class="code" href="struct_win_att_struct.html#aa9c1c94dee4ebbe95eb392f738835055">h</a> = -1;
- <a name="l01994"></a>01994 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].<a class="code" href="struct_win_att_struct.html#abd4485f9d84ad074c80fc4127922cb19">active</a> = 1;
- <a name="l01995"></a>01995 }
- <a name="l01996"></a>01996
- <a name="l01997"></a>01997 <a class="code" href="pumax_8c.html#a12ad38f5f4aa5d1e7bce98e305662e3b">CreateTestWindow</a>();
- <a name="l01998"></a>01998
- <a name="l01999"></a>01999 <span class="keywordflow">if</span> (MRpid >= 0) sprintf(GUI_default,<span class="stringliteral">"GUI_%2.2d.cfg"</span>,MRpid);
- <a name="l02000"></a>02000 <a class="code" href="pumax_8c.html#ad40ddde2f8d2265ae3fd119645f85603">ReadConfig</a>(GUI_default);
- <a name="l02001"></a>02001 <span class="keywordflow">if</span> (MRpid >= 0) sprintf(GUI_config,<span class="stringliteral">"GUI_last_used_%2.2d.cfg"</span>,MRpid);
- <a name="l02002"></a>02002 <a class="code" href="pumax_8c.html#ad40ddde2f8d2265ae3fd119645f85603">ReadConfig</a>(GUI_config);
- <a name="l02003"></a>02003
- <a name="l02004"></a>02004 <a class="code" href="pumax_8c.html#a51c0b8738867e745ec3ebd94e879f08f">LoadFonts</a>();
- <a name="l02005"></a>02005 <a class="code" href="pumax_8c.html#a32a86742844c9c69ff991885e4519233">CreateControlWindow</a>();
- <a name="l02006"></a>02006
- <a name="l02007"></a>02007 OutXSize = (ScreenW-<a class="code" href="pumax_8c.html#a59713e313b4ee9b7937c09d8aeb88994">ScreenOffset</a>) / WinCols;
- <a name="l02008"></a>02008 OutYSize = (CowY-ScreenOffset-1-<a class="code" href="pumax_8c.html#a6e0e87f9eb0c26037ddf9147bf56f097">WM_top_area</a>) / WinRows;
- <a name="l02009"></a>02009 WinXSize = OutXSize - WinLM - <a class="code" href="pumax_8c.html#a261f1b75cb979500af635c616e19771d">WinRM</a>;
- <a name="l02010"></a>02010 WinYSize = OutYSize - WinTM - <a class="code" href="pumax_8c.html#ad6e080222bafe5cdc477c0a8ae13d144">WinBM</a>;
- <a name="l02011"></a>02011 WinSizeHints.flags = PPosition | PSize | PMinSize;
- <a name="l02012"></a>02012 WinSizeHints.min_width = 200;
- <a name="l02013"></a>02013 WinSizeHints.min_height = 100;
- <a name="l02014"></a>02014 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>)
- <a name="l02015"></a>02015 {
- <a name="l02016"></a>02016 printf(<span class="stringliteral">"Outer windowsize = %dx%d\n"</span>,OutXSize,OutYSize);
- <a name="l02017"></a>02017 printf(<span class="stringliteral">"Inner windowsize = %dx%d\n"</span>,WinXSize,WinYSize);
- <a name="l02018"></a>02018 }
- <a name="l02019"></a>02019
- <a name="l02020"></a>02020 wm_hints.initial_state = NormalState;
- <a name="l02021"></a>02021 wm_hints.input = True;
- <a name="l02022"></a>02022 wm_hints.flags = StateHint | InputHint;
- <a name="l02023"></a>02023
- <a name="l02024"></a>02024 class_hints.res_name = progname;
- <a name="l02025"></a>02025 class_hints.res_class = <span class="stringliteral">"PUMA"</span>;
- <a name="l02026"></a>02026
- <a name="l02027"></a>02027 Delwin = XInternAtom(display,<span class="stringliteral">"WM_DELETE_WINDOW"</span>,0);
- <a name="l02028"></a>02028
- <a name="l02029"></a>02029 <a class="code" href="pumax_8c.html#a41e1f6018aa05db3f476b89732b96923">ReadImage</a>(&<a class="code" href="pumax_8c.html#a0aac8b0778521c19e621a6b60b3e1a4b">MapHR</a>,<span class="stringliteral">"map.bmp"</span>);
- <a name="l02030"></a>02030
- <a name="l02031"></a>02031 <span class="keywordflow">for</span> (i = 0 ; i < <a class="code" href="pumax_8c.html#a2364498cd60ebd2201eeef32ce76e882">NumWin</a> ; ++i)
- <a name="l02032"></a>02032 {
- <a name="l02033"></a>02033 x = <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].<a class="code" href="struct_win_att_struct.html#aa00d94640c9eb39ceac56f95c595f62a">x</a>;
- <a name="l02034"></a>02034 y = <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].<a class="code" href="struct_win_att_struct.html#a770cabf1d350db5890f636ccf30e5d47">y</a>;
- <a name="l02035"></a>02035 w = <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].<a class="code" href="struct_win_att_struct.html#a6e7f8041c23d41b7d2835a2b855d35f0">w</a>;
- <a name="l02036"></a>02036 h = <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].<a class="code" href="struct_win_att_struct.html#aa9c1c94dee4ebbe95eb392f738835055">h</a>;
- <a name="l02037"></a>02037
- <a name="l02038"></a>02038 <span class="keywordflow">if</span> (x < ScreenOffset || x >= ScreenW) x = ScreenOffset+(i%<a class="code" href="pumax_8c.html#ab861bd4dcef3d655198c4eb74dea5eb7">WinCols</a>)*OutXSize;
- <a name="l02039"></a>02039 <span class="keywordflow">if</span> (y < ScreenOffset || y >= ScreenH) y = ScreenOffset+(i/<a class="code" href="pumax_8c.html#ab861bd4dcef3d655198c4eb74dea5eb7">WinCols</a>)*OutYSize+WM_top_area;
- <a name="l02040"></a>02040 <span class="keywordflow">if</span> (w < WinSizeHints.min_width ) w = <a class="code" href="pumax_8c.html#a90fa18336f52663513916236b6c3f633">WinXSize</a>;
- <a name="l02041"></a>02041 <span class="keywordflow">if</span> (h < WinSizeHints.min_height) h = <a class="code" href="pumax_8c.html#a48ba2c20a7bf82da8f16252eff21155f">WinYSize</a>;
- <a name="l02042"></a>02042 XStringListToTextProperty(&WindowTitle[i],1,WindowName+i);
- <a name="l02043"></a>02043 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].active)
- <a name="l02044"></a>02044 {
- <a name="l02045"></a>02045 <span class="keywordflow">if</span> (MRnum == 2 && MRpid == 1) x += <a class="code" href="pumax_8c.html#a47745e91e472dc647c023d88e004f6be">ScreenW</a>;
- <a name="l02046"></a>02046 Win[i] = XCreateWindow(display,RootWindow(display,screen_num), <span class="comment">// display, parent</span>
- <a name="l02047"></a>02047 x,y,w,h,
- <a name="l02048"></a>02048 BorderWidth,CopyFromParent,InputOutput, <span class="comment">// border, depth, class</span>
- <a name="l02049"></a>02049 CopyFromParent,0,NULL); <span class="comment">// visual, valuemask, attributes</span>
- <a name="l02050"></a>02050 XSetWMProtocols(display,Win[i],&Delwin,1);
- <a name="l02051"></a>02051 XSetWMProperties(display,Win[i],WindowName+i,NULL,
- <a name="l02052"></a>02052 NULL,0,&WinSizeHints,&wm_hints,&class_hints);
- <a name="l02053"></a>02053 XSelectInput(display,Win[i],ButtonPressMask | KeyPressMask | ExposureMask);
- <a name="l02054"></a>02054 XMapWindow(display,Win[i]);
- <a name="l02055"></a>02055 }
- <a name="l02056"></a>02056 }
- <a name="l02057"></a>02057
- <a name="l02058"></a>02058 <span class="comment">/* Prepare GC */</span>
- <a name="l02059"></a>02059
- <a name="l02060"></a>02060 gc = XCreateGC(display, Cow, valuemask, &values);
- <a name="l02061"></a>02061 XSetFont(display, gc, FixFont->fid);
- <a name="l02062"></a>02062 colormap = XDefaultColormap(display,screen_num);
- <a name="l02063"></a>02063 XSetForeground(display,gc,BlackPix);
- <a name="l02064"></a>02064 XSetBackground(display,gc,WhitePix);
- <a name="l02065"></a>02065
- <a name="l02066"></a>02066 <span class="comment">/* Get keyboard information */</span>
- <a name="l02067"></a>02067
- <a name="l02068"></a>02068 XDisplayKeycodes(display,&FirstKey,&LastKey);
- <a name="l02069"></a>02069 KeyMap = XGetKeyboardMapping(display,FirstKey,LastKey-FirstKey+1,&SymsPerKey);
- <a name="l02070"></a>02070
- <a name="l02071"></a>02071 <span class="comment">/* Allocate color cells */</span>
- <a name="l02072"></a>02072
- <a name="l02073"></a>02073 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#afa68e13002f97f4041b7acca426be273">NUMPAL</a> ; ++i)
- <a name="l02074"></a>02074 LineCo[i] = <a class="code" href="pumax_8c.html#a77c9c27e1c3052a37c3cb275828ae40d">AllocateColorCells</a>(Pallet[i]);
- <a name="l02075"></a>02075
- <a name="l02076"></a>02076 <span class="comment">/* Color cells for control window */</span>
- <a name="l02077"></a>02077
- <a name="l02078"></a>02078 XAllocNamedColor(display,colormap,<span class="stringliteral">"red"</span> ,&Red ,&Dummy);
- <a name="l02079"></a>02079 XAllocNamedColor(display,colormap,<span class="stringliteral">"green"</span> ,&Green ,&Dummy);
- <a name="l02080"></a>02080 XAllocNamedColor(display,colormap,<span class="stringliteral">"blue"</span> ,&Blue ,&Dummy);
- <a name="l02081"></a>02081 XAllocNamedColor(display,colormap,<span class="stringliteral">"grey"</span> ,&Grey ,&Dummy);
- <a name="l02082"></a>02082 XAllocNamedColor(display,colormap,<span class="stringliteral">"yellow"</span> ,&Yellow ,&Dummy);
- <a name="l02083"></a>02083 XAllocNamedColor(display,colormap,<span class="stringliteral">"hot pink"</span> ,&LightRed ,&Dummy);
- <a name="l02084"></a>02084 XAllocNamedColor(display,colormap,<span class="stringliteral">"dark red"</span> ,&DarkRed ,&Dummy);
- <a name="l02085"></a>02085 XAllocNamedColor(display,colormap,<span class="stringliteral">"light blue"</span> ,&LightBlue ,&Dummy);
- <a name="l02086"></a>02086 XAllocNamedColor(display,colormap,<span class="stringliteral">"dark blue"</span> ,&DarkBlue ,&Dummy);
- <a name="l02087"></a>02087 XAllocNamedColor(display,colormap,<span class="stringliteral">"light green"</span>,&LightGreen,&Dummy);
- <a name="l02088"></a>02088 XAllocNamedColor(display,colormap,<span class="stringliteral">"dark green"</span> ,&DarkGreen ,&Dummy);
- <a name="l02089"></a>02089
- <a name="l02090"></a>02090 TSColor[0] = Red.pixel;
- <a name="l02091"></a>02091 TSColor[1] = Green.pixel;
- <a name="l02092"></a>02092 TSColor[2] = Blue.pixel;
- <a name="l02093"></a>02093 TSColor[3] = <a class="code" href="pumax_8c.html#a648bfcb426b534ebd09a13bb909de1fe">WhitePix</a>;
- <a name="l02094"></a>02094 TSColor[4] = LightRed.pixel;
- <a name="l02095"></a>02095 TSColor[5] = Grey.pixel;
- <a name="l02096"></a>02096 TSColor[6] = Yellow.pixel;
- <a name="l02097"></a>02097 TSColor[7] = LightBlue.pixel;
- <a name="l02098"></a>02098 TSColor[8] = LightGreen.pixel;
- <a name="l02099"></a>02099
- <a name="l02100"></a>02100 <a class="code" href="pumax_8c.html#af2e92313aaf18974c4fa6c1cb34cd7a3">ClearTracer</a>();
- <a name="l02101"></a>02101 <a class="code" href="pumax_8c.html#ade32a2443eb96bdf5e02320868703e0f">CalcButtonAreas</a>();
- <a name="l02102"></a>02102 <a class="code" href="pumax_8c.html#a41f77efa657ce06e158034152384bf2e">RedrawControlWindow</a>();
- <a name="l02103"></a>02103 XSync(display,0);
- <a name="l02104"></a>02104 }
- <a name="l02105"></a>02105
- <a name="l02106"></a><a class="code" href="pumax_8c.html#a6c5818f7478712a4523abe737e1ce114">02106</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a6c5818f7478712a4523abe737e1ce114">FillPoly</a>(<span class="keywordtype">int</span> n, <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> Poly[])
- <a name="l02107"></a>02107 {
- <a name="l02108"></a>02108 <span class="keywordtype">int</span> i;
- <a name="l02109"></a>02109 XPoint xpol[8];
- <a name="l02110"></a>02110 <span class="keywordflow">for</span> (i=0; i < n ; ++i)
- <a name="l02111"></a>02111 {
- <a name="l02112"></a>02112 xpol[i].x = OffX + Poly[i+i ] + 0.5;
- <a name="l02113"></a>02113 xpol[i].y = OffY + Poly[i+i+1] + 0.5;
- <a name="l02114"></a>02114 }
- <a name="l02115"></a>02115 XFillPolygon(display,pix,gc,xpol,n,Convex,CoordModeOrigin);
- <a name="l02116"></a>02116 }
- <a name="l02117"></a>02117
- <a name="l02118"></a>02118 <span class="comment">/* ======= */</span>
- <a name="l02119"></a>02119 <span class="comment">/* IsoArea */</span>
- <a name="l02120"></a>02120 <span class="comment">/* ======= */</span>
- <a name="l02121"></a>02121
- <a name="l02122"></a><a class="code" href="pumax_8c.html#ad7ade548a65553d0e985249abc1ec296">02122</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#ad7ade548a65553d0e985249abc1ec296">IsoArea</a>(<a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> y, <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> vl, <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> vh, <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> Top[], <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> Bot[], <a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> Dim)
- <a name="l02123"></a>02123 {
- <a name="l02124"></a>02124 <a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> f,x,p;
- <a name="l02125"></a>02125 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> xl,xr,yt,yb;
- <a name="l02126"></a>02126 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> Poly[16];
- <a name="l02127"></a>02127
- <a name="l02128"></a>02128 <span class="comment">// if (Debug) printf("IsoArea %d %10.2f %10.2f %10.2f %10.2f %d\n",y,vl,vh,Top[0],Bot[0],Dim);</span>
- <a name="l02129"></a>02129 <span class="keywordflow">for</span> (x=0 ; x < Dim-1 ; x++)
- <a name="l02130"></a>02130 {
- <a name="l02131"></a>02131 Flag[x] = 0;
- <a name="l02132"></a>02132 <span class="keywordflow">if</span> (Top[x ] < vl) Flag[x] |= <a class="code" href="pumax_8c.html#a5290d0773637802c437cf688938b1fe9">TOLELO</a>;
- <a name="l02133"></a>02133 <span class="keywordflow">if</span> (Top[x ] >= vh) Flag[x] |= <a class="code" href="pumax_8c.html#a23aceec46faeb7e48b2883afca874b02">TOLEHI</a>;
- <a name="l02134"></a>02134 <span class="keywordflow">if</span> (Top[x+1] < vl) Flag[x] |= <a class="code" href="pumax_8c.html#a89053abaa38cd43b0dbdbf70f6f644bd">TORILO</a>;
- <a name="l02135"></a>02135 <span class="keywordflow">if</span> (Top[x+1] >= vh) Flag[x] |= <a class="code" href="pumax_8c.html#a00b399ecbf8e7ce66fc45ae97d0ef149">TORIHI</a>;
- <a name="l02136"></a>02136 <span class="keywordflow">if</span> (Bot[x ] < vl) Flag[x] |= <a class="code" href="pumax_8c.html#a26b56bf73405ae78f65554674d5bee88">BOLELO</a>;
- <a name="l02137"></a>02137 <span class="keywordflow">if</span> (Bot[x ] >= vh) Flag[x] |= <a class="code" href="pumax_8c.html#aec2de7a30131a34fd4a1475ef8120fc3">BOLEHI</a>;
- <a name="l02138"></a>02138 <span class="keywordflow">if</span> (Bot[x+1] < vl) Flag[x] |= <a class="code" href="pumax_8c.html#ac392454edf5f88606de52c510958b37b">BORILO</a>;
- <a name="l02139"></a>02139 <span class="keywordflow">if</span> (Bot[x+1] >= vh) Flag[x] |= <a class="code" href="pumax_8c.html#ad2487d10128a4605d2c520818e714817">BORIHI</a>;
- <a name="l02140"></a>02140 }
- <a name="l02141"></a>02141
- <a name="l02142"></a>02142 x = 0;
- <a name="l02143"></a>02143
- <a name="l02144"></a>02144 <span class="keywordflow">while</span> (x < Dim-1)
- <a name="l02145"></a>02145 {
- <a name="l02146"></a>02146 xl = VGAX * x ;
- <a name="l02147"></a>02147 xr = VGAX * (x+1);
- <a name="l02148"></a>02148 yt = VGAY * y ;
- <a name="l02149"></a>02149 yb = VGAY * (y+1);
- <a name="l02150"></a>02150 f = Flag[x];
- <a name="l02151"></a>02151
- <a name="l02152"></a>02152 <span class="keywordflow">if</span> (f == 0)
- <a name="l02153"></a>02153 {
- <a name="l02154"></a>02154 x++;
- <a name="l02155"></a>02155 <span class="keywordflow">while</span> (x < Dim-1 && Flag[x] == 0)
- <a name="l02156"></a>02156 {
- <a name="l02157"></a>02157 x++;
- <a name="l02158"></a>02158 xr = VGAX * x;
- <a name="l02159"></a>02159 }
- <a name="l02160"></a>02160 Poly[0] = Poly[6] = xl;
- <a name="l02161"></a>02161 Poly[1] = Poly[3] = yt;
- <a name="l02162"></a>02162 Poly[2] = Poly[4] = xr;
- <a name="l02163"></a>02163 Poly[5] = Poly[7] = yb;
- <a name="l02164"></a>02164
- <a name="l02165"></a>02165 <a class="code" href="pumax_8c.html#a6c5818f7478712a4523abe737e1ce114">FillPoly</a>(4,Poly);
- <a name="l02166"></a>02166
- <a name="l02167"></a>02167 }
- <a name="l02168"></a>02168 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (f == (<a class="code" href="pumax_8c.html#a5290d0773637802c437cf688938b1fe9">TOLELO</a> | <a class="code" href="pumax_8c.html#a89053abaa38cd43b0dbdbf70f6f644bd">TORILO</a> | <a class="code" href="pumax_8c.html#a26b56bf73405ae78f65554674d5bee88">BOLELO</a> | <a class="code" href="pumax_8c.html#ac392454edf5f88606de52c510958b37b">BORILO</a>) ||
- <a name="l02169"></a>02169 f == (<a class="code" href="pumax_8c.html#a23aceec46faeb7e48b2883afca874b02">TOLEHI</a> | <a class="code" href="pumax_8c.html#a00b399ecbf8e7ce66fc45ae97d0ef149">TORIHI</a> | <a class="code" href="pumax_8c.html#aec2de7a30131a34fd4a1475ef8120fc3">BOLEHI</a> | <a class="code" href="pumax_8c.html#ad2487d10128a4605d2c520818e714817">BORIHI</a>)) x++;
- <a name="l02170"></a>02170 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Top[x] < vl && Top[x+1] >= vl && Bot[x] >= vl && Bot[x+1] < vl)
- <a name="l02171"></a>02171 {
- <a name="l02172"></a>02172 Poly[1] = Poly[3] = yt;
- <a name="l02173"></a>02173 Poly[2] = Poly[4] = xr;
- <a name="l02174"></a>02174 Poly[0] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x ],vl,Top[x+1]);
- <a name="l02175"></a>02175 Poly[5] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],vl,Bot[x+1]);
- <a name="l02176"></a>02176 <a class="code" href="pumax_8c.html#a6c5818f7478712a4523abe737e1ce114">FillPoly</a>(3,Poly);
- <a name="l02177"></a>02177 Poly[1] = Poly[3] = yb;
- <a name="l02178"></a>02178 Poly[2] = Poly[4] = xl;
- <a name="l02179"></a>02179 Poly[0] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x ],vl,Bot[x+1]);
- <a name="l02180"></a>02180 Poly[5] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x ],vl,Bot[x ]);
- <a name="l02181"></a>02181 <a class="code" href="pumax_8c.html#a6c5818f7478712a4523abe737e1ce114">FillPoly</a>(3,Poly);
- <a name="l02182"></a>02182 ++x;
- <a name="l02183"></a>02183 }
- <a name="l02184"></a>02184 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Top[x] >= vl && Top[x+1] < vl && Bot[x] < vl && Bot[x+1] >= vl)
- <a name="l02185"></a>02185 {
- <a name="l02186"></a>02186 Poly[0] = Poly[4] = xl;
- <a name="l02187"></a>02187 Poly[1] = Poly[3] = yt;
- <a name="l02188"></a>02188 Poly[2] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x ],vl,Top[x+1]);
- <a name="l02189"></a>02189 Poly[5] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x ],vl,Bot[x ]);
- <a name="l02190"></a>02190 <a class="code" href="pumax_8c.html#a6c5818f7478712a4523abe737e1ce114">FillPoly</a>(3,Poly);
- <a name="l02191"></a>02191 Poly[0] = Poly[2] = xr;
- <a name="l02192"></a>02192 Poly[3] = Poly[5] = yb;
- <a name="l02193"></a>02193 Poly[1] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],vl,Bot[x+1]);
- <a name="l02194"></a>02194 Poly[4] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x ],vl,Bot[x+1]);
- <a name="l02195"></a>02195 <a class="code" href="pumax_8c.html#a6c5818f7478712a4523abe737e1ce114">FillPoly</a>(3,Poly);
- <a name="l02196"></a>02196 ++x;
- <a name="l02197"></a>02197 }
- <a name="l02198"></a>02198 <span class="keywordflow">else</span>
- <a name="l02199"></a>02199 {
- <a name="l02200"></a>02200 p = 0;
- <a name="l02201"></a>02201
- <a name="l02202"></a>02202 <span class="keywordflow">if</span> (Top[x] < vl)
- <a name="l02203"></a>02203 {
- <a name="l02204"></a>02204 <span class="keywordflow">if</span> (Top[x+1] >= vl)
- <a name="l02205"></a>02205 {
- <a name="l02206"></a>02206 Poly[p++] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x],vl,Top[x+1]);
- <a name="l02207"></a>02207 Poly[p++] = yt;
- <a name="l02208"></a>02208 }
- <a name="l02209"></a>02209
- <a name="l02210"></a>02210 <span class="keywordflow">if</span> (Top[x+1] >= vh)
- <a name="l02211"></a>02211 {
- <a name="l02212"></a>02212 Poly[p++] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x],vh,Top[x+1]);
- <a name="l02213"></a>02213 Poly[p++] = yt;
- <a name="l02214"></a>02214 }
- <a name="l02215"></a>02215 }
- <a name="l02216"></a>02216 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Top[x] >= vh)
- <a name="l02217"></a>02217 {
- <a name="l02218"></a>02218 <span class="keywordflow">if</span> (Top[x+1] < vh)
- <a name="l02219"></a>02219 {
- <a name="l02220"></a>02220 Poly[p++] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x],vh,Top[x+1]);
- <a name="l02221"></a>02221 Poly[p++] = yt;
- <a name="l02222"></a>02222 }
- <a name="l02223"></a>02223 <span class="keywordflow">if</span> (Top[x+1] < vl)
- <a name="l02224"></a>02224 {
- <a name="l02225"></a>02225 Poly[p++] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x],vl,Top[x+1]);
- <a name="l02226"></a>02226 Poly[p++] = yt;
- <a name="l02227"></a>02227 }
- <a name="l02228"></a>02228 }
- <a name="l02229"></a>02229 <span class="keywordflow">else</span>
- <a name="l02230"></a>02230 {
- <a name="l02231"></a>02231 Poly[p++] = xl;
- <a name="l02232"></a>02232 Poly[p++] = yt;
- <a name="l02233"></a>02233 <span class="keywordflow">if</span> (Top[x+1] < vl)
- <a name="l02234"></a>02234 {
- <a name="l02235"></a>02235 Poly[p++] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x],vl,Top[x+1]);
- <a name="l02236"></a>02236 Poly[p++] = yt;
- <a name="l02237"></a>02237 }
- <a name="l02238"></a>02238 <span class="keywordflow">if</span> (Top[x+1] >= vh)
- <a name="l02239"></a>02239 {
- <a name="l02240"></a>02240 Poly[p++] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x],vh,Top[x+1]);
- <a name="l02241"></a>02241 Poly[p++] = yt;
- <a name="l02242"></a>02242 }
- <a name="l02243"></a>02243 }
- <a name="l02244"></a>02244
- <a name="l02245"></a>02245 <span class="keywordflow">if</span> (Top[x+1] < vl)
- <a name="l02246"></a>02246 {
- <a name="l02247"></a>02247 <span class="keywordflow">if</span> (Bot[x+1] >= vl)
- <a name="l02248"></a>02248 {
- <a name="l02249"></a>02249 Poly[p++] = xr;
- <a name="l02250"></a>02250 Poly[p++] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],vl,Bot[x+1]);
- <a name="l02251"></a>02251 }
- <a name="l02252"></a>02252
- <a name="l02253"></a>02253 <span class="keywordflow">if</span> (Bot[x+1] >= vh)
- <a name="l02254"></a>02254 {
- <a name="l02255"></a>02255 Poly[p++] = xr;
- <a name="l02256"></a>02256 Poly[p++] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],vh,Bot[x+1]);
- <a name="l02257"></a>02257 }
- <a name="l02258"></a>02258 }
- <a name="l02259"></a>02259 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Top[x+1] >= vh)
- <a name="l02260"></a>02260 {
- <a name="l02261"></a>02261 <span class="keywordflow">if</span> (Bot[x+1] < vh)
- <a name="l02262"></a>02262 {
- <a name="l02263"></a>02263 Poly[p++] = xr;
- <a name="l02264"></a>02264 Poly[p++] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],vh,Bot[x+1]);
- <a name="l02265"></a>02265 }
- <a name="l02266"></a>02266 <span class="keywordflow">if</span> (Bot[x+1] < vl)
- <a name="l02267"></a>02267 {
- <a name="l02268"></a>02268 Poly[p++] = xr;
- <a name="l02269"></a>02269 Poly[p++] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],vl,Bot[x+1]);
- <a name="l02270"></a>02270 }
- <a name="l02271"></a>02271 }
- <a name="l02272"></a>02272 <span class="keywordflow">else</span>
- <a name="l02273"></a>02273 {
- <a name="l02274"></a>02274 Poly[p++] = xr;
- <a name="l02275"></a>02275 Poly[p++] = yt;
- <a name="l02276"></a>02276 <span class="keywordflow">if</span> (Bot[x+1] < vl)
- <a name="l02277"></a>02277 {
- <a name="l02278"></a>02278 Poly[p++] = xr;
- <a name="l02279"></a>02279 Poly[p++] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],vl,Bot[x+1]);
- <a name="l02280"></a>02280 }
- <a name="l02281"></a>02281 <span class="keywordflow">if</span> (Bot[x+1] >= vh)
- <a name="l02282"></a>02282 {
- <a name="l02283"></a>02283 Poly[p++] = xr;
- <a name="l02284"></a>02284 Poly[p++] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],vh,Bot[x+1]);
- <a name="l02285"></a>02285 }
- <a name="l02286"></a>02286 }
- <a name="l02287"></a>02287
- <a name="l02288"></a>02288 <span class="keywordflow">if</span> (Bot[x+1] < vl)
- <a name="l02289"></a>02289 {
- <a name="l02290"></a>02290 <span class="keywordflow">if</span> (Bot[x] >= vl)
- <a name="l02291"></a>02291 {
- <a name="l02292"></a>02292 Poly[p++] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x],vl,Bot[x+1]);
- <a name="l02293"></a>02293 Poly[p++] = yb;
- <a name="l02294"></a>02294 }
- <a name="l02295"></a>02295 <span class="keywordflow">if</span> (Bot[x] >= vh)
- <a name="l02296"></a>02296 {
- <a name="l02297"></a>02297 Poly[p++] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x],vh,Bot[x+1]);
- <a name="l02298"></a>02298 Poly[p++] = yb;
- <a name="l02299"></a>02299 }
- <a name="l02300"></a>02300 }
- <a name="l02301"></a>02301 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Bot[x+1] >= vh)
- <a name="l02302"></a>02302 {
- <a name="l02303"></a>02303 <span class="keywordflow">if</span> (Bot[x] < vh)
- <a name="l02304"></a>02304 {
- <a name="l02305"></a>02305 Poly[p++] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x],vh,Bot[x+1]);
- <a name="l02306"></a>02306 Poly[p++] = yb;
- <a name="l02307"></a>02307 }
- <a name="l02308"></a>02308 <span class="keywordflow">if</span> (Bot[x] < vl)
- <a name="l02309"></a>02309 {
- <a name="l02310"></a>02310 Poly[p++] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x],vl,Bot[x+1]);
- <a name="l02311"></a>02311 Poly[p++] = yb;
- <a name="l02312"></a>02312 }
- <a name="l02313"></a>02313 }
- <a name="l02314"></a>02314 <span class="keywordflow">else</span>
- <a name="l02315"></a>02315 {
- <a name="l02316"></a>02316 Poly[p++] = xr;
- <a name="l02317"></a>02317 Poly[p++] = yb;
- <a name="l02318"></a>02318 <span class="keywordflow">if</span> (Bot[x] < vl)
- <a name="l02319"></a>02319 {
- <a name="l02320"></a>02320 Poly[p++] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x],vl,Bot[x+1]);
- <a name="l02321"></a>02321 Poly[p++] = yb;
- <a name="l02322"></a>02322 }
- <a name="l02323"></a>02323 <span class="keywordflow">if</span> (Bot[x] >= vh)
- <a name="l02324"></a>02324 {
- <a name="l02325"></a>02325 Poly[p++] = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x],vh,Bot[x+1]);
- <a name="l02326"></a>02326 Poly[p++] = yb;
- <a name="l02327"></a>02327 }
- <a name="l02328"></a>02328 }
- <a name="l02329"></a>02329
- <a name="l02330"></a>02330 <span class="keywordflow">if</span> (Bot[x] < vl)
- <a name="l02331"></a>02331 {
- <a name="l02332"></a>02332 <span class="keywordflow">if</span> (Top[x] >= vl)
- <a name="l02333"></a>02333 {
- <a name="l02334"></a>02334 Poly[p++] = xl;
- <a name="l02335"></a>02335 Poly[p++] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x],vl,Bot[x]);
- <a name="l02336"></a>02336 }
- <a name="l02337"></a>02337
- <a name="l02338"></a>02338 <span class="keywordflow">if</span> (Top[x] >= vh)
- <a name="l02339"></a>02339 {
- <a name="l02340"></a>02340 Poly[p++] = xl;
- <a name="l02341"></a>02341 Poly[p++] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x],vh,Bot[x]);
- <a name="l02342"></a>02342 }
- <a name="l02343"></a>02343 }
- <a name="l02344"></a>02344 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (Bot[x] >= vh)
- <a name="l02345"></a>02345 {
- <a name="l02346"></a>02346 <span class="keywordflow">if</span> (Top[x] < vh)
- <a name="l02347"></a>02347 {
- <a name="l02348"></a>02348 Poly[p++] = xl;
- <a name="l02349"></a>02349 Poly[p++] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x],vh,Bot[x]);
- <a name="l02350"></a>02350 }
- <a name="l02351"></a>02351 <span class="keywordflow">if</span> (Top[x] < vl)
- <a name="l02352"></a>02352 {
- <a name="l02353"></a>02353 Poly[p++] = xl;
- <a name="l02354"></a>02354 Poly[p++] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x],vl,Bot[x]);
- <a name="l02355"></a>02355 }
- <a name="l02356"></a>02356 }
- <a name="l02357"></a>02357 <span class="keywordflow">else</span>
- <a name="l02358"></a>02358 {
- <a name="l02359"></a>02359 Poly[p++] = xl;
- <a name="l02360"></a>02360 Poly[p++] = yb;
- <a name="l02361"></a>02361 <span class="keywordflow">if</span> (Top[x] < vl)
- <a name="l02362"></a>02362 {
- <a name="l02363"></a>02363 Poly[p++] = xl;
- <a name="l02364"></a>02364 Poly[p++] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x],vl,Bot[x]);
- <a name="l02365"></a>02365 }
- <a name="l02366"></a>02366 <span class="keywordflow">if</span> (Top[x] >= vh)
- <a name="l02367"></a>02367 {
- <a name="l02368"></a>02368 Poly[p++] = xl;
- <a name="l02369"></a>02369 Poly[p++] = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x],vh,Bot[x]);
- <a name="l02370"></a>02370 }
- <a name="l02371"></a>02371 }
- <a name="l02372"></a>02372 <a class="code" href="pumax_8c.html#a6c5818f7478712a4523abe737e1ce114">FillPoly</a>(p>>1,Poly);
- <a name="l02373"></a>02373 x++;
- <a name="l02374"></a>02374 }
- <a name="l02375"></a>02375 }
- <a name="l02376"></a>02376 }
- <a name="l02377"></a>02377
- <a name="l02378"></a>02378
- <a name="l02379"></a>02379 <span class="comment">/* ======= */</span>
- <a name="l02380"></a>02380 <span class="comment">/* isoarea */</span>
- <a name="l02381"></a>02381 <span class="comment">/* ======= */</span>
- <a name="l02382"></a>02382
- <a name="l02383"></a><a class="code" href="pumax_8c.html#a84c2cc0435ae795bd3d15064ffea1501">02383</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a84c2cc0435ae795bd3d15064ffea1501">IsoAreas</a>(<span class="keyword">struct</span> <a class="code" href="struct_color_strip.html">ColorStrip</a> Strip[])
- <a name="l02384"></a>02384 {
- <a name="l02385"></a>02385 <a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> i;
- <a name="l02386"></a>02386 <a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> y;
- <a name="l02387"></a>02387 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *Top;
- <a name="l02388"></a>02388 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *Bot;
- <a name="l02389"></a>02389
- <a name="l02390"></a>02390 i = 0;
- <a name="l02391"></a>02391 <span class="keywordflow">while</span> (Strip[i].Name)
- <a name="l02392"></a>02392 {
- <a name="l02393"></a>02393 Top = <a class="code" href="pumax_8c.html#a253b4cae7d3fe7a244b1bb3163e268f3">Field</a>;
- <a name="l02394"></a>02394 Bot = Field + <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l02395"></a>02395 XSetForeground(display,gc,Strip[i].pixel);
- <a name="l02396"></a>02396 <span class="keywordflow">for</span> (y = 0 ; y < DimY-1 ; y++)
- <a name="l02397"></a>02397 {
- <a name="l02398"></a>02398 <a class="code" href="pumax_8c.html#ad7ade548a65553d0e985249abc1ec296">IsoArea</a>(y,Strip[i].Lo,Strip[i].Hi,Top,Bot,DimX);
- <a name="l02399"></a>02399 Top += <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l02400"></a>02400 Bot += <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l02401"></a>02401 }
- <a name="l02402"></a>02402 ++i;
- <a name="l02403"></a>02403 }
- <a name="l02404"></a>02404 }
- <a name="l02405"></a>02405
- <a name="l02406"></a>02406 <span class="comment">/* ======= */</span>
- <a name="l02407"></a>02407 <span class="comment">/* IsoLine */</span>
- <a name="l02408"></a>02408 <span class="comment">/* ======= */</span>
- <a name="l02409"></a>02409
- <a name="l02410"></a><a class="code" href="pumax_8c.html#a504c78c3761e9eacdf1e513b29f88a5a">02410</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a504c78c3761e9eacdf1e513b29f88a5a">IsoLine</a>(<a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> y, <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> v, <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> Top[], <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> Bot[], <a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> Dim)
- <a name="l02411"></a>02411 {
- <a name="l02412"></a>02412 <a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> f,x;
- <a name="l02413"></a>02413 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> xl,xr,yt,yb;
- <a name="l02414"></a>02414 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> x1,yo,x2,y2,x3,y3,x4,y4;
- <a name="l02415"></a>02415
- <a name="l02416"></a>02416 <span class="keywordflow">for</span> (x=0 ; x < Dim-1 ; x++)
- <a name="l02417"></a>02417 {
- <a name="l02418"></a>02418 Flag[x] = 0;
- <a name="l02419"></a>02419 <span class="keywordflow">if</span> (Top[x ] < v) Flag[x] |= <a class="code" href="pumax_8c.html#a5290d0773637802c437cf688938b1fe9">TOLELO</a>;
- <a name="l02420"></a>02420 <span class="keywordflow">else</span> Flag[x] |= <a class="code" href="pumax_8c.html#a23aceec46faeb7e48b2883afca874b02">TOLEHI</a>;
- <a name="l02421"></a>02421 <span class="keywordflow">if</span> (Top[x+1] < v) Flag[x] |= <a class="code" href="pumax_8c.html#a89053abaa38cd43b0dbdbf70f6f644bd">TORILO</a>;
- <a name="l02422"></a>02422 <span class="keywordflow">else</span> Flag[x] |= <a class="code" href="pumax_8c.html#a00b399ecbf8e7ce66fc45ae97d0ef149">TORIHI</a>;
- <a name="l02423"></a>02423 <span class="keywordflow">if</span> (Bot[x ] < v) Flag[x] |= <a class="code" href="pumax_8c.html#a26b56bf73405ae78f65554674d5bee88">BOLELO</a>;
- <a name="l02424"></a>02424 <span class="keywordflow">else</span> Flag[x] |= <a class="code" href="pumax_8c.html#aec2de7a30131a34fd4a1475ef8120fc3">BOLEHI</a>;
- <a name="l02425"></a>02425 <span class="keywordflow">if</span> (Bot[x+1] < v) Flag[x] |= <a class="code" href="pumax_8c.html#ac392454edf5f88606de52c510958b37b">BORILO</a>;
- <a name="l02426"></a>02426 <span class="keywordflow">else</span> Flag[x] |= <a class="code" href="pumax_8c.html#ad2487d10128a4605d2c520818e714817">BORIHI</a>;
- <a name="l02427"></a>02427 }
- <a name="l02428"></a>02428
- <a name="l02429"></a>02429 x = 0;
- <a name="l02430"></a>02430
- <a name="l02431"></a>02431 <span class="keywordflow">while</span> (x < Dim-1)
- <a name="l02432"></a>02432 {
- <a name="l02433"></a>02433 xl = VGAX * x ;
- <a name="l02434"></a>02434 xr = VGAX * (x+1);
- <a name="l02435"></a>02435 yt = VGAY * y ;
- <a name="l02436"></a>02436 yb = VGAY * (y+1);
- <a name="l02437"></a>02437 f = Flag[x];
- <a name="l02438"></a>02438
- <a name="l02439"></a>02439 <span class="keywordflow">if</span> (f == 0 || f == (<a class="code" href="pumax_8c.html#a5290d0773637802c437cf688938b1fe9">TOLELO</a> | <a class="code" href="pumax_8c.html#a89053abaa38cd43b0dbdbf70f6f644bd">TORILO</a> | <a class="code" href="pumax_8c.html#a26b56bf73405ae78f65554674d5bee88">BOLELO</a> | <a class="code" href="pumax_8c.html#ac392454edf5f88606de52c510958b37b">BORILO</a>) ||
- <a name="l02440"></a>02440 f == (<a class="code" href="pumax_8c.html#a23aceec46faeb7e48b2883afca874b02">TOLEHI</a> | <a class="code" href="pumax_8c.html#a00b399ecbf8e7ce66fc45ae97d0ef149">TORIHI</a> | <a class="code" href="pumax_8c.html#aec2de7a30131a34fd4a1475ef8120fc3">BOLEHI</a> | <a class="code" href="pumax_8c.html#ad2487d10128a4605d2c520818e714817">BORIHI</a>)) x++;
- <a name="l02441"></a>02441 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (f == (<a class="code" href="pumax_8c.html#a5290d0773637802c437cf688938b1fe9">TOLELO</a> | <a class="code" href="pumax_8c.html#ac392454edf5f88606de52c510958b37b">BORILO</a> | <a class="code" href="pumax_8c.html#a00b399ecbf8e7ce66fc45ae97d0ef149">TORIHI</a> | <a class="code" href="pumax_8c.html#aec2de7a30131a34fd4a1475ef8120fc3">BOLEHI</a>))
- <a name="l02442"></a>02442 {
- <a name="l02443"></a>02443 x1 = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x ],v,Top[x+1]);
- <a name="l02444"></a>02444 yo = yt;
- <a name="l02445"></a>02445 x2 = xr;
- <a name="l02446"></a>02446 y2 = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],v,Bot[x+1]);
- <a name="l02447"></a>02447 x3 = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x ],v,Bot[x+1]);
- <a name="l02448"></a>02448 y3 = yb;
- <a name="l02449"></a>02449 x4 = xl;
- <a name="l02450"></a>02450 y4 = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x ],v,Bot[x ]);
- <a name="l02451"></a>02451 XDrawLine(display,pix,gc,x1,OffY+yo,x2,OffY+y2);
- <a name="l02452"></a>02452 XDrawLine(display,pix,gc,x3,OffY+y3,x4,OffY+y4);
- <a name="l02453"></a>02453 ++x;
- <a name="l02454"></a>02454 }
- <a name="l02455"></a>02455 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (f == (<a class="code" href="pumax_8c.html#a89053abaa38cd43b0dbdbf70f6f644bd">TORILO</a> | <a class="code" href="pumax_8c.html#a26b56bf73405ae78f65554674d5bee88">BOLELO</a> | <a class="code" href="pumax_8c.html#a23aceec46faeb7e48b2883afca874b02">TOLEHI</a> | <a class="code" href="pumax_8c.html#ad2487d10128a4605d2c520818e714817">BORIHI</a>))
- <a name="l02456"></a>02456 {
- <a name="l02457"></a>02457 x1 = xl;
- <a name="l02458"></a>02458 yo = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x ],v,Bot[x ]);
- <a name="l02459"></a>02459 x2 = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x ],v,Top[x+1]);
- <a name="l02460"></a>02460 y2 = yt;
- <a name="l02461"></a>02461 x3 = xr;
- <a name="l02462"></a>02462 y3 = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],v,Bot[x+1]);
- <a name="l02463"></a>02463 x4 = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x ],v,Bot[x+1]);
- <a name="l02464"></a>02464 y4 = yb;
- <a name="l02465"></a>02465 XDrawLine(display,pix,gc,x1,OffY+yo,x2,OffY+y2);
- <a name="l02466"></a>02466 XDrawLine(display,pix,gc,x3,OffY+y3,x4,OffY+y4);
- <a name="l02467"></a>02467 ++x;
- <a name="l02468"></a>02468 }
- <a name="l02469"></a>02469 <span class="keywordflow">else</span>
- <a name="l02470"></a>02470 {
- <a name="l02471"></a>02471 x1 = x2 = x3 = x4 = -1;
- <a name="l02472"></a>02472
- <a name="l02473"></a>02473 <span class="keywordflow">if</span> (Top[x ] < v && Top[x+1] >= v || Top[x ] >= v && Top[x+1] < v)
- <a name="l02474"></a>02474 {
- <a name="l02475"></a>02475 x1 = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x ],v,Top[x+1]);
- <a name="l02476"></a>02476 yo = yt;
- <a name="l02477"></a>02477 }
- <a name="l02478"></a>02478 <span class="keywordflow">if</span> (Top[x+1] < v && Bot[x+1] >= v || Top[x+1] >= v && Bot[x+1] < v)
- <a name="l02479"></a>02479 {
- <a name="l02480"></a>02480 x2 = xr;
- <a name="l02481"></a>02481 y2 = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],v,Bot[x+1]);
- <a name="l02482"></a>02482 }
- <a name="l02483"></a>02483 <span class="keywordflow">if</span> (Bot[x+1] < v && Bot[x ] >= v || Bot[x+1] >= v && Bot[x ] < v)
- <a name="l02484"></a>02484 {
- <a name="l02485"></a>02485 x3 = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x ],v,Bot[x+1]);
- <a name="l02486"></a>02486 y3 = yb;
- <a name="l02487"></a>02487 }
- <a name="l02488"></a>02488 <span class="keywordflow">if</span> (Bot[x ] < v && Top[x ] >= v || Bot[x ] >= v && Top[x ] < v)
- <a name="l02489"></a>02489 {
- <a name="l02490"></a>02490 x4 = xl;
- <a name="l02491"></a>02491 y4 = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x ],v,Bot[x ]);
- <a name="l02492"></a>02492 }
- <a name="l02493"></a>02493
- <a name="l02494"></a>02494 <span class="keywordflow">if</span> (x1 >= 0 && x2 >= 0 && x3 >= 0 && x4 >= 0)
- <a name="l02495"></a>02495 {
- <a name="l02496"></a>02496 XDrawLine(display,pix,gc,x1,OffY+yo,x2,OffY+y2);
- <a name="l02497"></a>02497 XDrawLine(display,pix,gc,x3,OffY+y3,x4,OffY+y4);
- <a name="l02498"></a>02498 }
- <a name="l02499"></a>02499 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (x1 >= 0)
- <a name="l02500"></a>02500 {
- <a name="l02501"></a>02501 <span class="keywordflow">if</span> (x2 >= 0) XDrawLine(display,pix,gc,x1,OffY+yo,x2,OffY+y2);
- <a name="l02502"></a>02502 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (x3 >= 0) XDrawLine(display,pix,gc,x1,OffY+yo,x3,OffY+y3);
- <a name="l02503"></a>02503 <span class="keywordflow">else</span> XDrawLine(display,pix,gc,x1,OffY+yo,x4,OffY+y4);
- <a name="l02504"></a>02504 }
- <a name="l02505"></a>02505 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (x2 >= 0)
- <a name="l02506"></a>02506 {
- <a name="l02507"></a>02507 <span class="keywordflow">if</span> (x3 >= 0) XDrawLine(display,pix,gc,x2,OffY+y2,x3,OffY+y3);
- <a name="l02508"></a>02508 <span class="keywordflow">else</span> XDrawLine(display,pix,gc,x2,OffY+y2,x4,OffY+y4);
- <a name="l02509"></a>02509 }
- <a name="l02510"></a>02510 <span class="keywordflow">else</span> XDrawLine(display,pix,gc,x3,OffY+y3,x4,OffY+y4);
- <a name="l02511"></a>02511
- <a name="l02512"></a>02512 x++;
- <a name="l02513"></a>02513 }
- <a name="l02514"></a>02514 }
- <a name="l02515"></a>02515 }
- <a name="l02516"></a>02516
- <a name="l02517"></a>02517
- <a name="l02518"></a>02518 <span class="comment">/* ======== */</span>
- <a name="l02519"></a>02519 <span class="comment">/* IsoLines */</span>
- <a name="l02520"></a>02520 <span class="comment">/* ======== */</span>
- <a name="l02521"></a>02521
- <a name="l02522"></a><a class="code" href="pumax_8c.html#a7e589e7ff7d5125738a34547b5756253">02522</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a7e589e7ff7d5125738a34547b5756253">IsoLines</a>(<span class="keyword">struct</span> <a class="code" href="struct_color_strip.html">ColorStrip</a> Strip[],<span class="keywordtype">int</span> Colored)
- <a name="l02523"></a>02523 {
- <a name="l02524"></a>02524 <a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> i;
- <a name="l02525"></a>02525 <a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> y;
- <a name="l02526"></a>02526 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *Top;
- <a name="l02527"></a>02527 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *Bot;
- <a name="l02528"></a>02528
- <a name="l02529"></a>02529 XSetForeground(display,gc,BlackPix);
- <a name="l02530"></a>02530 i = 0;
- <a name="l02531"></a>02531 <span class="keywordflow">while</span> (Strip[i].Name)
- <a name="l02532"></a>02532 {
- <a name="l02533"></a>02533 Top = <a class="code" href="pumax_8c.html#a253b4cae7d3fe7a244b1bb3163e268f3">Field</a>;
- <a name="l02534"></a>02534 Bot = Field + <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l02535"></a>02535 <span class="keywordflow">if</span> (Colored) XSetForeground(display,gc,Strip[i].pixel);
- <a name="l02536"></a>02536 <span class="keywordflow">for</span> (y = 0 ; y < DimY-1 ; y++)
- <a name="l02537"></a>02537 {
- <a name="l02538"></a>02538 <a class="code" href="pumax_8c.html#a504c78c3761e9eacdf1e513b29f88a5a">IsoLine</a>(y,Strip[i].Lo,Top,Bot,DimX);
- <a name="l02539"></a>02539 Top += <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l02540"></a>02540 Bot += <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l02541"></a>02541 }
- <a name="l02542"></a>02542 ++i;
- <a name="l02543"></a>02543 }
- <a name="l02544"></a>02544 }
- <a name="l02545"></a>02545
- <a name="l02546"></a><a class="code" href="pumax_8c.html#a9bfabdda2a305f2db1097729ef1c4428">02546</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a9bfabdda2a305f2db1097729ef1c4428">AziPoint</a>(<span class="keywordtype">int</span> fpx, <span class="keywordtype">int</span> fpy, <span class="keywordtype">int</span> *x2, <span class="keywordtype">int</span> *y2)
- <a name="l02547"></a>02547 {
- <a name="l02548"></a>02548 <span class="keywordtype">int</span> xc,yc;
- <a name="l02549"></a>02549 <span class="keywordtype">double</span> flam,fsin,fcos,roa,pil,piy;
- <a name="l02550"></a>02550
- <a name="l02551"></a>02551 xc = InXSize >> 1;
- <a name="l02552"></a>02552 yc = InYSize >> 1;
- <a name="l02553"></a>02553 roa = <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[<a class="code" href="pumax_8c.html#a7fee7b546595edcbee920757b6309386">win</a>].<a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a> * InXSize / 360.0;
- <a name="l02554"></a>02554 pil = 2.0 * M_PI / <a class="code" href="pumax_8c.html#a77751be4ce780fbc796f89264e0834ed">InXSize</a>;
- <a name="l02555"></a>02555 piy = M_PI / <a class="code" href="pumax_8c.html#a2e0311fae05aa716cc8cd6669af5bf3a">InYSize</a>;
- <a name="l02556"></a>02556
- <a name="l02557"></a>02557 flam = (fpx - xc - roa) * pil;
- <a name="l02558"></a>02558 <span class="keywordflow">if</span> (flam < -M_PI) flam += 2.0 * M_PI;
- <a name="l02559"></a>02559 <span class="keywordflow">if</span> (flam > M_PI) flam -= 2.0 * M_PI;
- <a name="l02560"></a>02560 <span class="keywordflow">if</span> (flam < -M_PI_2 || flam > M_PI_2) <span class="keywordflow">return</span> 1;
- <a name="l02561"></a>02561 fsin = sin(flam);
- <a name="l02562"></a>02562 fcos = cos((fpy-yc) * piy);
- <a name="l02563"></a>02563 *x2 = xc + InYSize/2 * fcos * fsin;
- <a name="l02564"></a>02564 *y2 = yc + InYSize/2 * sin((fpy-yc) * piy);
- <a name="l02565"></a>02565 <span class="keywordflow">return</span> 0;
- <a name="l02566"></a>02566 }
- <a name="l02567"></a>02567
- <a name="l02568"></a><a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">02568</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">AziLine</a>(<span class="keywordtype">int</span> x1, <span class="keywordtype">int</span> y1, <span class="keywordtype">int</span> x2, <span class="keywordtype">int</span> y2)
- <a name="l02569"></a>02569 {
- <a name="l02570"></a>02570 <span class="keywordtype">int</span> a1,b1,a2,b2;
- <a name="l02571"></a>02571
- <a name="l02572"></a>02572 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a9bfabdda2a305f2db1097729ef1c4428">AziPoint</a>(x1,y1,&a1,&b1)) <span class="keywordflow">return</span>;
- <a name="l02573"></a>02573 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a9bfabdda2a305f2db1097729ef1c4428">AziPoint</a>(x2,y2,&a2,&b2)) <span class="keywordflow">return</span>;
- <a name="l02574"></a>02574 XDrawLine(display,pix,gc,a1,b1,a2,b2);
- <a name="l02575"></a>02575 }
- <a name="l02576"></a>02576
- <a name="l02577"></a>02577
- <a name="l02578"></a>02578 <span class="comment">/* ======= */</span>
- <a name="l02579"></a>02579 <span class="comment">/* MapLine */</span>
- <a name="l02580"></a>02580 <span class="comment">/* ======= */</span>
- <a name="l02581"></a>02581
- <a name="l02582"></a><a class="code" href="pumax_8c.html#a00887bcdd028fc005fa4e26f5b3c926a">02582</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a00887bcdd028fc005fa4e26f5b3c926a">MapLine</a>(<a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> y, <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> v, <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> Top[], <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> Bot[], <a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> Dim)
- <a name="l02583"></a>02583 {
- <a name="l02584"></a>02584 <a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> f,x;
- <a name="l02585"></a>02585 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> xl,xr,yt,yb;
- <a name="l02586"></a>02586 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> x1,yo,x2,y2,x3,y3,x4,y4;
- <a name="l02587"></a>02587
- <a name="l02588"></a>02588 <span class="keywordflow">for</span> (x=0 ; x < Dim-1 ; x++)
- <a name="l02589"></a>02589 {
- <a name="l02590"></a>02590 Flag[x] = 0;
- <a name="l02591"></a>02591 <span class="keywordflow">if</span> (Top[x ] < v) Flag[x] |= <a class="code" href="pumax_8c.html#a5290d0773637802c437cf688938b1fe9">TOLELO</a>;
- <a name="l02592"></a>02592 <span class="keywordflow">else</span> Flag[x] |= <a class="code" href="pumax_8c.html#a23aceec46faeb7e48b2883afca874b02">TOLEHI</a>;
- <a name="l02593"></a>02593 <span class="keywordflow">if</span> (Top[x+1] < v) Flag[x] |= <a class="code" href="pumax_8c.html#a89053abaa38cd43b0dbdbf70f6f644bd">TORILO</a>;
- <a name="l02594"></a>02594 <span class="keywordflow">else</span> Flag[x] |= <a class="code" href="pumax_8c.html#a00b399ecbf8e7ce66fc45ae97d0ef149">TORIHI</a>;
- <a name="l02595"></a>02595 <span class="keywordflow">if</span> (Bot[x ] < v) Flag[x] |= <a class="code" href="pumax_8c.html#a26b56bf73405ae78f65554674d5bee88">BOLELO</a>;
- <a name="l02596"></a>02596 <span class="keywordflow">else</span> Flag[x] |= <a class="code" href="pumax_8c.html#aec2de7a30131a34fd4a1475ef8120fc3">BOLEHI</a>;
- <a name="l02597"></a>02597 <span class="keywordflow">if</span> (Bot[x+1] < v) Flag[x] |= <a class="code" href="pumax_8c.html#ac392454edf5f88606de52c510958b37b">BORILO</a>;
- <a name="l02598"></a>02598 <span class="keywordflow">else</span> Flag[x] |= <a class="code" href="pumax_8c.html#ad2487d10128a4605d2c520818e714817">BORIHI</a>;
- <a name="l02599"></a>02599 }
- <a name="l02600"></a>02600
- <a name="l02601"></a>02601 x = 0;
- <a name="l02602"></a>02602
- <a name="l02603"></a>02603 <span class="keywordflow">while</span> (x < Dim-1)
- <a name="l02604"></a>02604 {
- <a name="l02605"></a>02605 xl = VGAX * x ;
- <a name="l02606"></a>02606 xr = VGAX * (x+1);
- <a name="l02607"></a>02607 yt = VGAY * y ;
- <a name="l02608"></a>02608 yb = VGAY * (y+1);
- <a name="l02609"></a>02609 f = Flag[x];
- <a name="l02610"></a>02610
- <a name="l02611"></a>02611 <span class="keywordflow">if</span> (f == 0 || f == (<a class="code" href="pumax_8c.html#a5290d0773637802c437cf688938b1fe9">TOLELO</a> | <a class="code" href="pumax_8c.html#a89053abaa38cd43b0dbdbf70f6f644bd">TORILO</a> | <a class="code" href="pumax_8c.html#a26b56bf73405ae78f65554674d5bee88">BOLELO</a> | <a class="code" href="pumax_8c.html#ac392454edf5f88606de52c510958b37b">BORILO</a>) ||
- <a name="l02612"></a>02612 f == (<a class="code" href="pumax_8c.html#a23aceec46faeb7e48b2883afca874b02">TOLEHI</a> | <a class="code" href="pumax_8c.html#a00b399ecbf8e7ce66fc45ae97d0ef149">TORIHI</a> | <a class="code" href="pumax_8c.html#aec2de7a30131a34fd4a1475ef8120fc3">BOLEHI</a> | <a class="code" href="pumax_8c.html#ad2487d10128a4605d2c520818e714817">BORIHI</a>)) x++;
- <a name="l02613"></a>02613 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (f == (<a class="code" href="pumax_8c.html#a5290d0773637802c437cf688938b1fe9">TOLELO</a> | <a class="code" href="pumax_8c.html#ac392454edf5f88606de52c510958b37b">BORILO</a> | <a class="code" href="pumax_8c.html#a00b399ecbf8e7ce66fc45ae97d0ef149">TORIHI</a> | <a class="code" href="pumax_8c.html#aec2de7a30131a34fd4a1475ef8120fc3">BOLEHI</a>))
- <a name="l02614"></a>02614 {
- <a name="l02615"></a>02615 x1 = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x ],v,Top[x+1]);
- <a name="l02616"></a>02616 yo = yt;
- <a name="l02617"></a>02617 x2 = xr;
- <a name="l02618"></a>02618 y2 = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],v,Bot[x+1]);
- <a name="l02619"></a>02619 x3 = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x ],v,Bot[x+1]);
- <a name="l02620"></a>02620 y3 = yb;
- <a name="l02621"></a>02621 x4 = xl;
- <a name="l02622"></a>02622 y4 = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x ],v,Bot[x ]);
- <a name="l02623"></a>02623 <a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">AziLine</a>(x1,OffY+yo,x2,OffY+y2);
- <a name="l02624"></a>02624 <a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">AziLine</a>(x3,OffY+y3,x4,OffY+y4);
- <a name="l02625"></a>02625 ++x;
- <a name="l02626"></a>02626 }
- <a name="l02627"></a>02627 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (f == (<a class="code" href="pumax_8c.html#a89053abaa38cd43b0dbdbf70f6f644bd">TORILO</a> | <a class="code" href="pumax_8c.html#a26b56bf73405ae78f65554674d5bee88">BOLELO</a> | <a class="code" href="pumax_8c.html#a23aceec46faeb7e48b2883afca874b02">TOLEHI</a> | <a class="code" href="pumax_8c.html#ad2487d10128a4605d2c520818e714817">BORIHI</a>))
- <a name="l02628"></a>02628 {
- <a name="l02629"></a>02629 x1 = xl;
- <a name="l02630"></a>02630 yo = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x ],v,Bot[x ]);
- <a name="l02631"></a>02631 x2 = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x ],v,Top[x+1]);
- <a name="l02632"></a>02632 y2 = yt;
- <a name="l02633"></a>02633 x3 = xr;
- <a name="l02634"></a>02634 y3 = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],v,Bot[x+1]);
- <a name="l02635"></a>02635 x4 = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x ],v,Bot[x+1]);
- <a name="l02636"></a>02636 y4 = yb;
- <a name="l02637"></a>02637 <a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">AziLine</a>(x1,OffY+yo,x2,OffY+y2);
- <a name="l02638"></a>02638 <a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">AziLine</a>(x3,OffY+y3,x4,OffY+y4);
- <a name="l02639"></a>02639 ++x;
- <a name="l02640"></a>02640 }
- <a name="l02641"></a>02641 <span class="keywordflow">else</span>
- <a name="l02642"></a>02642 {
- <a name="l02643"></a>02643 x1 = x2 = x3 = x4 = -1;
- <a name="l02644"></a>02644
- <a name="l02645"></a>02645 <span class="keywordflow">if</span> (Top[x ] < v && Top[x+1] >= v || Top[x ] >= v && Top[x+1] < v)
- <a name="l02646"></a>02646 {
- <a name="l02647"></a>02647 x1 = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Top[x ],v,Top[x+1]);
- <a name="l02648"></a>02648 yo = yt;
- <a name="l02649"></a>02649 }
- <a name="l02650"></a>02650 <span class="keywordflow">if</span> (Top[x+1] < v && Bot[x+1] >= v || Top[x+1] >= v && Bot[x+1] < v)
- <a name="l02651"></a>02651 {
- <a name="l02652"></a>02652 x2 = xr;
- <a name="l02653"></a>02653 y2 = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x+1],v,Bot[x+1]);
- <a name="l02654"></a>02654 }
- <a name="l02655"></a>02655 <span class="keywordflow">if</span> (Bot[x+1] < v && Bot[x ] >= v || Bot[x+1] >= v && Bot[x ] < v)
- <a name="l02656"></a>02656 {
- <a name="l02657"></a>02657 x3 = <a class="code" href="pumax_8c.html#a206ade3db8b254271ebb6f283b7d56e9">IPX</a>(Bot[x ],v,Bot[x+1]);
- <a name="l02658"></a>02658 y3 = yb;
- <a name="l02659"></a>02659 }
- <a name="l02660"></a>02660 <span class="keywordflow">if</span> (Bot[x ] < v && Top[x ] >= v || Bot[x ] >= v && Top[x ] < v)
- <a name="l02661"></a>02661 {
- <a name="l02662"></a>02662 x4 = xl;
- <a name="l02663"></a>02663 y4 = <a class="code" href="pumax_8c.html#a723a06f7d61f6cfca3e2dd361e3c8b84">IPY</a>(Top[x ],v,Bot[x ]);
- <a name="l02664"></a>02664 }
- <a name="l02665"></a>02665
- <a name="l02666"></a>02666 <span class="keywordflow">if</span> (x1 >= 0 && x2 >= 0 && x3 >= 0 && x4 >= 0)
- <a name="l02667"></a>02667 {
- <a name="l02668"></a>02668 <a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">AziLine</a>(x1,OffY+yo,x2,OffY+y2);
- <a name="l02669"></a>02669 <a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">AziLine</a>(x3,OffY+y3,x4,OffY+y4);
- <a name="l02670"></a>02670 }
- <a name="l02671"></a>02671 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (x1 >= 0)
- <a name="l02672"></a>02672 {
- <a name="l02673"></a>02673 <span class="keywordflow">if</span> (x2 >= 0) <a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">AziLine</a>(x1,OffY+yo,x2,OffY+y2);
- <a name="l02674"></a>02674 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (x3 >= 0) <a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">AziLine</a>(x1,OffY+yo,x3,OffY+y3);
- <a name="l02675"></a>02675 <span class="keywordflow">else</span> <a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">AziLine</a>(x1,OffY+yo,x4,OffY+y4);
- <a name="l02676"></a>02676 }
- <a name="l02677"></a>02677 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (x2 >= 0)
- <a name="l02678"></a>02678 {
- <a name="l02679"></a>02679 <span class="keywordflow">if</span> (x3 >= 0) <a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">AziLine</a>(x2,OffY+y2,x3,OffY+y3);
- <a name="l02680"></a>02680 <span class="keywordflow">else</span> <a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">AziLine</a>(x2,OffY+y2,x4,OffY+y4);
- <a name="l02681"></a>02681 }
- <a name="l02682"></a>02682 <span class="keywordflow">else</span> <a class="code" href="pumax_8c.html#a9b626be7d39ba1ac55ca69aecc44269c">AziLine</a>(x3,OffY+y3,x4,OffY+y4);
- <a name="l02683"></a>02683
- <a name="l02684"></a>02684 x++;
- <a name="l02685"></a>02685 }
- <a name="l02686"></a>02686 }
- <a name="l02687"></a>02687 }
- <a name="l02688"></a>02688
- <a name="l02689"></a>02689
- <a name="l02690"></a>02690 <span class="comment">/* ======== */</span>
- <a name="l02691"></a>02691 <span class="comment">/* MapLines */</span>
- <a name="l02692"></a>02692 <span class="comment">/* ======== */</span>
- <a name="l02693"></a>02693
- <a name="l02694"></a><a class="code" href="pumax_8c.html#aa0f5f3d7c6ce01b3b6fda010e082dd77">02694</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#aa0f5f3d7c6ce01b3b6fda010e082dd77">MapLines</a>(<span class="keyword">struct</span> <a class="code" href="struct_color_strip.html">ColorStrip</a> Strip[],<span class="keywordtype">int</span> Colored)
- <a name="l02695"></a>02695 {
- <a name="l02696"></a>02696 <a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> i;
- <a name="l02697"></a>02697 <a class="code" href="pumax_8c.html#afeeffe52c8fd59db7c61cf8b02042dbf">INT</a> y;
- <a name="l02698"></a>02698 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *Top;
- <a name="l02699"></a>02699 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *Bot;
- <a name="l02700"></a>02700
- <a name="l02701"></a>02701 XSetForeground(display,gc,BlackPix);
- <a name="l02702"></a>02702 i = 0;
- <a name="l02703"></a>02703 <span class="keywordflow">while</span> (Strip[i].Name)
- <a name="l02704"></a>02704 {
- <a name="l02705"></a>02705 Top = <a class="code" href="pumax_8c.html#a253b4cae7d3fe7a244b1bb3163e268f3">Field</a>;
- <a name="l02706"></a>02706 Bot = Field + <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l02707"></a>02707 <span class="keywordflow">if</span> (Colored) XSetForeground(display,gc,Strip[i].pixel);
- <a name="l02708"></a>02708 <span class="keywordflow">for</span> (y = 0 ; y < DimY-1 ; y++)
- <a name="l02709"></a>02709 {
- <a name="l02710"></a>02710 <a class="code" href="pumax_8c.html#a00887bcdd028fc005fa4e26f5b3c926a">MapLine</a>(y,Strip[i].Lo,Top,Bot,DimX);
- <a name="l02711"></a>02711 Top += <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l02712"></a>02712 Bot += <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l02713"></a>02713 }
- <a name="l02714"></a>02714 ++i;
- <a name="l02715"></a>02715 }
- <a name="l02716"></a>02716 }
- <a name="l02717"></a>02717
- <a name="l02718"></a><a class="code" href="pumax_8c.html#a73d7fb41b6b6b8934862332333623d8c">02718</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a73d7fb41b6b6b8934862332333623d8c">polco</a> = 0;
- <a name="l02719"></a>02719
- <a name="l02720"></a><a class="code" href="pumax_8c.html#af256ffce2b6bb644016fe5500c154447">02720</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#af256ffce2b6bb644016fe5500c154447">poltra</a>(<span class="keywordtype">float</span> lam, <span class="keywordtype">float</span> phi, <span class="keywordtype">float</span> *x, <span class="keywordtype">float</span> *y)
- <a name="l02721"></a>02721 {
- <a name="l02722"></a>02722 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> xnp,ynp,xsp,ysp,lfa;
- <a name="l02723"></a>02723
- <a name="l02724"></a>02724 lfa = (2.0 * M_PI) / (InXSize-1) ;
- <a name="l02725"></a>02725 xnp = (InXSize-1) * 0.25;
- <a name="l02726"></a>02726 ynp = (InYSize-1) * 0.50;
- <a name="l02727"></a>02727 xsp = (InXSize-1) * 0.75;
- <a name="l02728"></a>02728 ysp = ynp;
- <a name="l02729"></a>02729
- <a name="l02730"></a>02730 <span class="comment">/* Northern hemisphere */</span>
- <a name="l02731"></a>02731
- <a name="l02732"></a>02732 <span class="keywordflow">if</span> (phi < ynp)
- <a name="l02733"></a>02733 {
- <a name="l02734"></a>02734 *x = xnp + sin(lam * lfa) * phi;
- <a name="l02735"></a>02735 *y = ynp + cos(lam * lfa) * phi;
- <a name="l02736"></a>02736 }
- <a name="l02737"></a>02737
- <a name="l02738"></a>02738 <span class="comment">/* Souhern hemisphere */</span>
- <a name="l02739"></a>02739
- <a name="l02740"></a>02740 <span class="keywordflow">else</span>
- <a name="l02741"></a>02741 {
- <a name="l02742"></a>02742 *x = xsp - sin(lam * lfa) * (phi-ysp);
- <a name="l02743"></a>02743 *y = ysp + cos(lam * lfa) * (phi-ysp);
- <a name="l02744"></a>02744 }
- <a name="l02745"></a>02745 }
- <a name="l02746"></a>02746
- <a name="l02747"></a>02747
- <a name="l02748"></a>02748 <span class="comment">/* ========== */</span>
- <a name="l02749"></a>02749 <span class="comment">/* TracerPlot */</span>
- <a name="l02750"></a>02750 <span class="comment">/* ========== */</span>
- <a name="l02751"></a>02751
- <a name="l02752"></a><a class="code" href="pumax_8c.html#ab15932b28ace63693c23be5e639ed1d9">02752</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#ab15932b28ace63693c23be5e639ed1d9">TracerPlot</a>(<span class="keywordtype">int</span> w)
- <a name="l02753"></a>02753 {
- <a name="l02754"></a>02754 <span class="keywordtype">int</span> j,ipx,ipy,lpy,lpx,jx,jy,ic,ix,iy,ipr;
- <a name="l02755"></a>02755 <span class="keywordtype">int</span> xnp,ynp,xsp,ysp,xc,yc;
- <a name="l02756"></a>02756 <span class="keywordtype">float</span> *u;
- <a name="l02757"></a>02757 <span class="keywordtype">float</span> *v;
- <a name="l02758"></a>02758 <span class="keywordtype">float</span> fpx,fpy,du,dv,ppx,ppy,rx,ry,spfac;
- <a name="l02759"></a>02759 <span class="keywordtype">float</span> lfa,lam,phi,hpy,fcos,fsin;
- <a name="l02760"></a>02760 <span class="keywordtype">float</span> pil,piy;
- <a name="l02761"></a>02761 <span class="keywordtype">float</span> roa;
- <a name="l02762"></a>02762 <span class="keywordtype">float</span> flam;
- <a name="l02763"></a>02763 <span class="keywordtype">float</span> dpx,dpy;
- <a name="l02764"></a>02764
- <a name="l02765"></a>02765 <span class="keywordflow">if</span> (Uindex < 0 || Vindex < 0) <span class="keywordflow">return</span>; <span class="comment">// Data missing</span>
- <a name="l02766"></a>02766
- <a name="l02767"></a>02767 Delpar = (8 * 60) / DeltaTime; <span class="comment">// Injection interval</span>
- <a name="l02768"></a>02768 <span class="keywordflow">if</span> (LevelChanged[w]) <a class="code" href="pumax_8c.html#af2e92313aaf18974c4fa6c1cb34cd7a3">ClearTracer</a>();
- <a name="l02769"></a>02769 LevelChanged[w] = 0;
- <a name="l02770"></a>02770 <span class="keywordflow">if</span> (!SpeedScale) SpeedScale = <a class="code" href="pumax_8c.html#a2ec2314ef785dc1cddc562590cd034ad">FloatAlloc</a>(DimY,<span class="stringliteral">"SpeedScale"</span>);
- <a name="l02771"></a>02771 u = <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[<a class="code" href="pumax_8c.html#abec6f96b33294d2bb005f4aa387ee123">Uindex</a>].<a class="code" href="struct_array_struct.html#a38c55a484b3d01e2ffa11f14de2adfd9">Data</a> + Indez[w] * <a class="code" href="pumax_8c.html#a132288db6a5e56bd89aedf01da72b83f">DimXY</a>;
- <a name="l02772"></a>02772 v = <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[<a class="code" href="pumax_8c.html#abb16042facad6e19f6bdada929a4522a">Vindex</a>].<a class="code" href="struct_array_struct.html#a38c55a484b3d01e2ffa11f14de2adfd9">Data</a> + Indez[w] * <a class="code" href="pumax_8c.html#a132288db6a5e56bd89aedf01da72b83f">DimXY</a>;
- <a name="l02773"></a>02773
- <a name="l02774"></a>02774 TracerColor = Yellow.pixel;
- <a name="l02775"></a>02775 <span class="keywordflow">if</span> (nstep % (8*Delpar) == 0) ColInd++;
- <a name="l02776"></a>02776 <span class="keywordflow">if</span> (ColInd >= <a class="code" href="pumax_8c.html#a7f2aa7d59c57b8054e230e2f72564671">AUTOCOLORS</a>) ColInd = 0;
- <a name="l02777"></a>02777 TracerColor = Autostrip[<a class="code" href="pumax_8c.html#ad3a3fa1de4fcbf5d06e0ac6277cb85a3">ColInd</a>].<a class="code" href="struct_color_strip.html#ab1a6137a580d2a1817f4d8e127d4743c">pixel</a>;
- <a name="l02778"></a>02778
- <a name="l02779"></a>02779 dpx = (float)(InXSize-1) / (float)(DimX-1);
- <a name="l02780"></a>02780 dpy = (float)(InYSize-1) / (float)(DimY-1);
- <a name="l02781"></a>02781 lpx = <a class="code" href="pumax_8c.html#a77751be4ce780fbc796f89264e0834ed">InXSize</a>;
- <a name="l02782"></a>02782 lpy = <a class="code" href="pumax_8c.html#a2e0311fae05aa716cc8cd6669af5bf3a">InYSize</a>;
- <a name="l02783"></a>02783 hpy = 0.5 * dpy;
- <a name="l02784"></a>02784 xc = lpx / 2;
- <a name="l02785"></a>02785 yc = lpy / 2;
- <a name="l02786"></a>02786 ipr = InXSize / 400;
- <a name="l02787"></a>02787 pil = 2.0 * M_PI / lpx;
- <a name="l02788"></a>02788 piy = M_PI / lpy;
- <a name="l02789"></a>02789 roa = <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a> * lpx / 360.0;
- <a name="l02790"></a>02790
- <a name="l02791"></a>02791 <span class="comment">// Compute scale factors</span>
- <a name="l02792"></a>02792
- <a name="l02793"></a>02793 <span class="keywordflow">if</span> (SizeChanged || nstep < 10)
- <a name="l02794"></a>02794 {
- <a name="l02795"></a>02795 <span class="keywordflow">for</span> (j=0 ; j < <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a>; ++j)
- <a name="l02796"></a>02796 {
- <a name="l02797"></a>02797 SpeedScale[j] = InXSize * DeltaTime * 60.0 / 40000000.0
- <a name="l02798"></a>02798 / cos((j-0.5*(DimY-1)) * (M_PI/DimY));
- <a name="l02799"></a>02799 }
- <a name="l02800"></a>02800 SpeedScale[DimY-1] = SpeedScale[0] = SpeedScale[1];
- <a name="l02801"></a>02801 }
- <a name="l02802"></a>02802
- <a name="l02803"></a>02803 <span class="comment">// Insert new particles</span>
- <a name="l02804"></a>02804
- <a name="l02805"></a>02805 <span class="keywordflow">if</span> (nstep % Delpar == 0)
- <a name="l02806"></a>02806 {
- <a name="l02807"></a>02807 fpx = dpx * (DimX-1) / 2.0;
- <a name="l02808"></a>02808 <span class="keywordflow">for</span> (ipy = 0 ; ipy < lpy ; ipy += dpy)
- <a name="l02809"></a>02809 {
- <a name="l02810"></a>02810 ParInd = (ParInd+1) & (<a class="code" href="pumax_8c.html#ab5a0dcea45727946af71ece4d11e0278">MAXPAR</a>-1);
- <a name="l02811"></a>02811 pax[<a class="code" href="pumax_8c.html#ad9c64621bb1d0a098f803d806afe7549">ParInd</a>] = fpx;
- <a name="l02812"></a>02812 pay[<a class="code" href="pumax_8c.html#ad9c64621bb1d0a098f803d806afe7549">ParInd</a>] = ipy + hpy;
- <a name="l02813"></a>02813 pal[<a class="code" href="pumax_8c.html#ad9c64621bb1d0a098f803d806afe7549">ParInd</a>] = <a class="code" href="pumax_8c.html#a593e4a6696ba37b5108d683e031afc64">TracerColor</a>;
- <a name="l02814"></a>02814 }
- <a name="l02815"></a>02815 }
- <a name="l02816"></a>02816
- <a name="l02817"></a>02817 <span class="comment">// Move particles</span>
- <a name="l02818"></a>02818
- <a name="l02819"></a>02819 <span class="keywordflow">for</span> (j=0 ; j < <a class="code" href="pumax_8c.html#ab5a0dcea45727946af71ece4d11e0278">MAXPAR</a> ; ++j)
- <a name="l02820"></a>02820 <span class="keywordflow">if</span> (pax[j] >= 0.0 && pay[j] >= 0.0)
- <a name="l02821"></a>02821 {
- <a name="l02822"></a>02822 jx = rx = pax[j] / dpx;
- <a name="l02823"></a>02823 jy = ry = pay[j] / dpy;
- <a name="l02824"></a>02824 ic = jx + DimX * jy;
- <a name="l02825"></a>02825 ix = ic + 1;
- <a name="l02826"></a>02826 <span class="keywordflow">if</span> (jx >= DimX-1) ix -= <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l02827"></a>02827 iy = ic + <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l02828"></a>02828 <span class="keywordflow">if</span> (iy >= DimX * DimY) iy -= <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l02829"></a>02829 rx -= jx;
- <a name="l02830"></a>02830 ry -= jy;
- <a name="l02831"></a>02831
- <a name="l02832"></a>02832 du = u[ic]+(u[ix]-u[ic])*rx+(u[iy]-u[ic])*ry;
- <a name="l02833"></a>02833 dv = v[ic]+(v[ix]-v[ic])*rx+(v[iy]-v[ic])*ry;
- <a name="l02834"></a>02834 spfac = SpeedScale[jy] + (SpeedScale[jy+1]-SpeedScale[jy]) * ry;
- <a name="l02835"></a>02835 du *= spfac;
- <a name="l02836"></a>02836 dv *= spfac;
- <a name="l02837"></a>02837 fpx = pax[j] + du;
- <a name="l02838"></a>02838 fpy = pay[j] + dv;
- <a name="l02839"></a>02839 <span class="keywordflow">if</span> (fpx < 0.0) fpx += lpx;
- <a name="l02840"></a>02840 <span class="keywordflow">if</span> (fpx >= lpx) fpx -= lpx;
- <a name="l02841"></a>02841 <span class="keywordflow">if</span> (fpy < 0.0 || fpy > lpy-1)
- <a name="l02842"></a>02842 {
- <a name="l02843"></a>02843 pay[j] = -1.0;
- <a name="l02844"></a>02844 <span class="keywordflow">continue</span>;
- <a name="l02845"></a>02845 }
- <a name="l02846"></a>02846 pax[j] = fpx;
- <a name="l02847"></a>02847 pay[j] = fpy;
- <a name="l02848"></a>02848 ipx = -1;
- <a name="l02849"></a>02849 <span class="keywordflow">if</span> (MapPro[w] == <a class="code" href="pumax_8c.html#ad431eb8cf00095009fcd1924efffa213">POLAR</a>)
- <a name="l02850"></a>02850 {
- <a name="l02851"></a>02851 lfa = (2.0 * M_PI) / lpx;
- <a name="l02852"></a>02852 xnp = (InXSize-1) * 0.25;
- <a name="l02853"></a>02853 ynp = (InYSize-1) * 0.50;
- <a name="l02854"></a>02854 xsp = (InXSize-1) * 0.75;
- <a name="l02855"></a>02855 ysp = ynp;
- <a name="l02856"></a>02856 lam = fpx;
- <a name="l02857"></a>02857 phi = fpy;
- <a name="l02858"></a>02858 <span class="keywordflow">if</span> (phi < 0.5 * lpy) <span class="comment">/* Northern hemisphere */</span>
- <a name="l02859"></a>02859 {
- <a name="l02860"></a>02860 fpx = xnp - sin(lam * lfa) * (phi + hpy);
- <a name="l02861"></a>02861 fpy = ynp - cos(lam * lfa) * (phi + hpy);
- <a name="l02862"></a>02862 }
- <a name="l02863"></a>02863 <span class="keywordflow">else</span> <span class="comment">/* Souhern hemisphere */</span>
- <a name="l02864"></a>02864 {
- <a name="l02865"></a>02865 fpx = xsp + sin(lam * lfa) * (lpy - phi + hpy);
- <a name="l02866"></a>02866 fpy = ysp - cos(lam * lfa) * (lpy - phi + hpy);
- <a name="l02867"></a>02867 }
- <a name="l02868"></a>02868 ipx = rintf(fpx);
- <a name="l02869"></a>02869 ipy = rintf(fpy);
- <a name="l02870"></a>02870 }
- <a name="l02871"></a>02871 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (MapPro[w] == <a class="code" href="pumax_8c.html#aae4090be0e30c18b0f22650479767d8f">AZIMUTHAL</a>)
- <a name="l02872"></a>02872 {
- <a name="l02873"></a>02873 flam = (fpx - xc - roa) * pil;
- <a name="l02874"></a>02874 <span class="keywordflow">if</span> (flam < -M_PI) flam += 2.0 * M_PI;
- <a name="l02875"></a>02875 <span class="keywordflow">if</span> (flam > M_PI) flam -= 2.0 * M_PI;
- <a name="l02876"></a>02876 <span class="keywordflow">if</span> (flam < -M_PI_2 || flam > M_PI_2) <span class="keywordflow">continue</span>;
- <a name="l02877"></a>02877 fsin = sin(flam);
- <a name="l02878"></a>02878 fcos = cos((fpy-yc) * piy);
- <a name="l02879"></a>02879 fpx = xc + lpy/2 * fcos * fsin;
- <a name="l02880"></a>02880 fpy = yc + lpy/2 * sin((fpy-yc) * piy);
- <a name="l02881"></a>02881 ipx = rintf(fpx);
- <a name="l02882"></a>02882 ipy = rintf(fpy);
- <a name="l02883"></a>02883 }
- <a name="l02884"></a>02884 <span class="keywordflow">else</span>
- <a name="l02885"></a>02885 {
- <a name="l02886"></a>02886 ipx = rintf(fpx);
- <a name="l02887"></a>02887 ipy = rintf(fpy);
- <a name="l02888"></a>02888 }
- <a name="l02889"></a>02889 <span class="keywordflow">if</span> (ipx >= 0)
- <a name="l02890"></a>02890 {
- <a name="l02891"></a>02891 XSetForeground(display,gc,pal[j]);
- <a name="l02892"></a>02892 <span class="keywordflow">if</span> (ipr < 2) XDrawPoint(display,pix,gc,ipx,ipy);
- <a name="l02893"></a>02893 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ipr == 2) XFillRectangle(display,pix,gc,ipx,ipy,2,2);
- <a name="l02894"></a>02894 <span class="keywordflow">else</span> XFillArc(display,pix,gc,ipx,ipy,ipr,ipr,0,360*64);
- <a name="l02895"></a>02895 }
- <a name="l02896"></a>02896 }
- <a name="l02897"></a>02897 }
- <a name="l02898"></a>02898
- <a name="l02899"></a>02899
- <a name="l02900"></a>02900 <span class="comment">/* ============= */</span>
- <a name="l02901"></a>02901 <span class="comment">/* AmplitudePlot */</span>
- <a name="l02902"></a>02902 <span class="comment">/* ============= */</span>
- <a name="l02903"></a>02903
- <a name="l02904"></a><a class="code" href="pumax_8c.html#aed8ad522611a864b8abd8b245d68ceac">02904</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#aed8ad522611a864b8abd8b245d68ceac">AmplitudePlot</a>(<span class="keywordtype">void</span>)
- <a name="l02905"></a>02905 {
- <a name="l02906"></a>02906 <span class="keywordtype">int</span> i,j,m,n;
- <a name="l02907"></a>02907 <span class="keywordtype">int</span> x,y;
- <a name="l02908"></a>02908 <span class="keywordtype">int</span> r,dx,dy;
- <a name="l02909"></a>02909 <span class="keywordtype">int</span> mmax;
- <a name="l02910"></a>02910 <span class="keywordtype">int</span> imax;
- <a name="l02911"></a>02911 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> Amax,Fac;
- <a name="l02912"></a>02912
- <a name="l02913"></a>02913 <span class="keywordflow">if</span> (!Ampli) Ampli = <a class="code" href="pumax_8c.html#a2ec2314ef785dc1cddc562590cd034ad">FloatAlloc</a>(DimX,<span class="stringliteral">"Ampli"</span>);
- <a name="l02914"></a>02914 <span class="keywordflow">if</span> (!Acol ) Acol = <a class="code" href="pumax_8c.html#aa507b1280c95bd8fb1d42c60d91e02ff">SizeAlloc</a>(DimX,<span class="keyword">sizeof</span>(XColor),<span class="stringliteral">"Acol"</span>);
- <a name="l02915"></a>02915
- <a name="l02916"></a>02916 Amax = 0.0;
- <a name="l02917"></a>02917 imax = 0;
- <a name="l02918"></a>02918 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a> ; ++i)
- <a name="l02919"></a>02919 {
- <a name="l02920"></a>02920 Ampli[i] = log (1.0 + sqrt(Field[2*i]*Field[2*i]+Field[2*i+1]*Field[2*i+1]));
- <a name="l02921"></a>02921 Acol[i].pixel = <a class="code" href="pumax_8c.html#a648bfcb426b534ebd09a13bb909de1fe">WhitePix</a>;
- <a name="l02922"></a>02922 <span class="keywordflow">if</span> (Ampli[i] > Amax && i > DimY)
- <a name="l02923"></a>02923 {
- <a name="l02924"></a>02924 Amax = Ampli[i];
- <a name="l02925"></a>02925 imax = i;
- <a name="l02926"></a>02926 }
- <a name="l02927"></a>02927 }
- <a name="l02928"></a>02928
- <a name="l02929"></a>02929 Fac = 0.0;
- <a name="l02930"></a>02930 <span class="keywordflow">if</span> (Amax > 1.e-20) Fac = 1.0 / Amax;
- <a name="l02931"></a>02931 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a> ; ++i)
- <a name="l02932"></a>02932 {
- <a name="l02933"></a>02933 j = <a class="code" href="pumax_8c.html#a9923377bd967d1dd49eb98f009f48fc2">AMPLI_COLS</a> * Ampli[i] * Fac;
- <a name="l02934"></a>02934 <span class="keywordflow">if</span> (j >= <a class="code" href="pumax_8c.html#a9923377bd967d1dd49eb98f009f48fc2">AMPLI_COLS</a>) j = <a class="code" href="pumax_8c.html#a9923377bd967d1dd49eb98f009f48fc2">AMPLI_COLS</a>-1;
- <a name="l02935"></a>02935 Acol[i].pixel = AmpliStrip[j].<a class="code" href="struct_color_strip.html#ab1a6137a580d2a1817f4d8e127d4743c">pixel</a>;
- <a name="l02936"></a>02936 }
- <a name="l02937"></a>02937
- <a name="l02938"></a>02938 dx = WinXSize / 23;
- <a name="l02939"></a>02939 r = (dx+dx) / 3;
- <a name="l02940"></a>02940 mmax = (InYSize / dx) - 1;
- <a name="l02941"></a>02941 XSetForeground(display,gc,BlackPix);
- <a name="l02942"></a>02942 <span class="keywordflow">for</span> (m=0,i=0 ; m < mmax ; ++m)
- <a name="l02943"></a>02943 {
- <a name="l02944"></a>02944 y = FixFontHeight + 4 + m * dx;
- <a name="l02945"></a>02945 <span class="keywordflow">for</span> (n=m ; n < <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a> ; ++n,++i)
- <a name="l02946"></a>02946 <span class="keywordflow">if</span> (n < 22)
- <a name="l02947"></a>02947 {
- <a name="l02948"></a>02948 x = dx/2 + n * dx;
- <a name="l02949"></a>02949 XSetForeground(display,gc,Acol[i].pixel);
- <a name="l02950"></a>02950 XFillArc(display,pix,gc,x,y,r,r,0,360*64);
- <a name="l02951"></a>02951 }
- <a name="l02952"></a>02952 }
- <a name="l02953"></a>02953 }
- <a name="l02954"></a>02954
- <a name="l02955"></a>02955
- <a name="l02956"></a><a class="code" href="pumax_8c.html#a2f9a1f5b15d5b0b8305a40270b38ab97">02956</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a2f9a1f5b15d5b0b8305a40270b38ab97">RedrawIsoWindow</a>(<span class="keywordtype">int</span> w)
- <a name="l02957"></a>02957 {
- <a name="l02958"></a>02958 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[w].Pix)
- <a name="l02959"></a>02959 XCopyArea(display,<a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[w].Pix,Win[w],gc,0,0,<a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[w].DimX,<a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[w].DimY,0,0);
- <a name="l02960"></a>02960 }
- <a name="l02961"></a>02961
- <a name="l02962"></a>02962
- <a name="l02963"></a><a class="code" href="pumax_8c.html#a64f109d6e1965c07709ba668a8e0e349">02963</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a64f109d6e1965c07709ba668a8e0e349">CloseWindow</a>(<span class="keywordtype">int</span> i)
- <a name="l02964"></a>02964 {
- <a name="l02965"></a>02965 <a class="code" href="pumax_8c.html#a83e35c70462fc81d9b622790c8661e8e">INTXS</a> X,Y,xp,yp;
- <a name="l02966"></a>02966 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> border,depth;
- <a name="l02967"></a>02967 Window Rootwin,Child;
- <a name="l02968"></a>02968
- <a name="l02969"></a>02969 <span class="keywordflow">if</span> (Win[i])
- <a name="l02970"></a>02970 {
- <a name="l02971"></a>02971 XGetGeometry(display,Win[i],&Rootwin,&xp,&yp,&<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].w,&<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].h,&border,&depth);
- <a name="l02972"></a>02972 XTranslateCoordinates(display,Win[i],Rootwin,0,0,&X,&Y,&Child);
- <a name="l02973"></a>02973 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].<a class="code" href="struct_win_att_struct.html#aa00d94640c9eb39ceac56f95c595f62a">x</a> = X - <a class="code" href="pumax_8c.html#a0a8a8622ae71c04112e4e0d9ccda7817">WinLM</a>;
- <a name="l02974"></a>02974 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].<a class="code" href="struct_win_att_struct.html#a770cabf1d350db5890f636ccf30e5d47">y</a> = Y - <a class="code" href="pumax_8c.html#a6529bd28fe04607bb7d71ff00a101e52">WinTM</a>;
- <a name="l02975"></a>02975 XDestroyWindow(display,Win[i]);
- <a name="l02976"></a>02976 Win[i] = 0;
- <a name="l02977"></a>02977 <a class="code" href="pumax_8c.html#a49d7de013de4c527a1bc7d1db4ea07d2">ShowWindowStatus</a>();
- <a name="l02978"></a>02978 }
- <a name="l02979"></a>02979 }
- <a name="l02980"></a>02980
- <a name="l02981"></a><a class="code" href="pumax_8c.html#a3a74ca8916dc6e6193c5f4ef8abec8ea">02981</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a3a74ca8916dc6e6193c5f4ef8abec8ea">ReopenWindow</a>(<span class="keywordtype">int</span> i)
- <a name="l02982"></a>02982 {
- <a name="l02983"></a>02983 <span class="keywordflow">if</span> (Win[i] == 0)
- <a name="l02984"></a>02984 {
- <a name="l02985"></a>02985 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].x < ScreenOffset) <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].<a class="code" href="struct_win_att_struct.html#aa00d94640c9eb39ceac56f95c595f62a">x</a> = ScreenOffset + OutXSize * (i % <a class="code" href="pumax_8c.html#ab861bd4dcef3d655198c4eb74dea5eb7">WinCols</a>);
- <a name="l02986"></a>02986 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].y < ScreenOffset) <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].<a class="code" href="struct_win_att_struct.html#a770cabf1d350db5890f636ccf30e5d47">y</a> = ScreenOffset + OutYSize * (i / <a class="code" href="pumax_8c.html#ab861bd4dcef3d655198c4eb74dea5eb7">WinCols</a>);
- <a name="l02987"></a>02987 Win[i] = XCreateSimpleWindow(display,RootWindow(display,screen_num),
- <a name="l02988"></a>02988 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].x,<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].y,<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].w,<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[i].h,
- <a name="l02989"></a>02989 BorderWidth,BlackPix,WhitePix);
- <a name="l02990"></a>02990 XSetWMProtocols(display,Win[i],&Delwin,1);
- <a name="l02991"></a>02991 XSetWMProperties(display,Win[i],WindowName+i,NULL,
- <a name="l02992"></a>02992 NULL,0,&WinSizeHints,&wm_hints,&class_hints);
- <a name="l02993"></a>02993 XSelectInput(display,Win[i],ButtonPressMask | KeyPressMask | ExposureMask);
- <a name="l02994"></a>02994 XMapWindow(display,Win[i]);
- <a name="l02995"></a>02995 <a class="code" href="pumax_8c.html#a49d7de013de4c527a1bc7d1db4ea07d2">ShowWindowStatus</a>();
- <a name="l02996"></a>02996 }
- <a name="l02997"></a>02997 }
- <a name="l02998"></a>02998
- <a name="l02999"></a><a class="code" href="pumax_8c.html#ad66f6229486420387d334e2685e85808">02999</a> <span class="keywordtype">char</span> *<a class="code" href="pumax_8c.html#ad66f6229486420387d334e2685e85808">HelpText</a>[] =
- <a name="l03000"></a>03000 {
- <a name="l03001"></a>03001 <span class="stringliteral">"Key assignment for azimuthal projection "</span>,
- <a name="l03002"></a>03002 <span class="stringliteral">"--------------------------------------------"</span>,
- <a name="l03003"></a>03003 <span class="stringliteral">"<- cursor left : increase westward rotation"</span>,
- <a name="l03004"></a>03004 <span class="stringliteral">"-> cursor right : increase eastward rotation"</span>,
- <a name="l03005"></a>03005 <span class="stringliteral">"============================================"</span>,
- <a name="l03006"></a>03006 <span class="stringliteral">"Key assignment for 3D variables "</span>,
- <a name="l03007"></a>03007 <span class="stringliteral">"--------------------------------------------"</span>,
- <a name="l03008"></a>03008 <span class="stringliteral">"^ cursor up : display next upper level "</span>,
- <a name="l03009"></a>03009 <span class="stringliteral">"v cursor down : display next lower level "</span>,
- <a name="l03010"></a>03010 <span class="stringliteral">"============================================"</span>,
- <a name="l03011"></a>03011 <span class="stringliteral">"Key assignment for Lon/Lev or Hovmoeller "</span>,
- <a name="l03012"></a>03012 <span class="stringliteral">"--------------------------------------------"</span>,
- <a name="l03013"></a>03013 <span class="stringliteral">"^ cursor up : switch latitude northwards"</span>,
- <a name="l03014"></a>03014 <span class="stringliteral">"v cursor down : switch latitude southwards"</span>,
- <a name="l03015"></a>03015 <span class="stringliteral">"============================================"</span>,
- <a name="l03016"></a>03016 <span class="stringliteral">"Mouse button assignment "</span>,
- <a name="l03017"></a>03017 <span class="stringliteral">"--------------------------------------------"</span>,
- <a name="l03018"></a>03018 <span class="stringliteral">"Left button : decrease level or latitude"</span>,
- <a name="l03019"></a>03019 <span class="stringliteral">"Right button : increase level or latitude"</span>,
- <a name="l03020"></a>03020 <span class="stringliteral">"Middle button : cycle through projections "</span>
- <a name="l03021"></a>03021 };
- <a name="l03022"></a>03022
- <a name="l03023"></a><a class="code" href="pumax_8c.html#adf9aace229442ed28b0437507d712a38">03023</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#adf9aace229442ed28b0437507d712a38">HelpLines</a> = <span class="keyword">sizeof</span>(<a class="code" href="pumax_8c.html#ad66f6229486420387d334e2685e85808">HelpText</a>) / <span class="keyword">sizeof</span>(<span class="keywordtype">char</span> *);
- <a name="l03024"></a>03024
- <a name="l03025"></a><a class="code" href="pumax_8c.html#aba750e7646eb34565d33fea6f31b676b">03025</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#aba750e7646eb34565d33fea6f31b676b">DrawHelpWindow</a>(<span class="keywordtype">void</span>)
- <a name="l03026"></a>03026 {
- <a name="l03027"></a>03027 <span class="keywordtype">int</span> x,y,j,l;
- <a name="l03028"></a>03028
- <a name="l03029"></a>03029 XSetForeground(display,gc,Yellow.pixel);
- <a name="l03030"></a>03030 XSetBackground(display,gc,DarkBlue.pixel);
- <a name="l03031"></a>03031 XSetFont(display,gc,BigFont->fid);
- <a name="l03032"></a>03032
- <a name="l03033"></a>03033 x = BigFontWidth / 2;
- <a name="l03034"></a>03034 <span class="keywordflow">for</span> (j=0 ; j < <a class="code" href="pumax_8c.html#adf9aace229442ed28b0437507d712a38">HelpLines</a> ; ++j)
- <a name="l03035"></a>03035 {
- <a name="l03036"></a>03036 y = BigFontHeight / 2 + BigFont->ascent + j * <a class="code" href="pumax_8c.html#a1d2254b4c4eccb72efc38d231910fe68">BigFontHeight</a>;
- <a name="l03037"></a>03037 l = strlen(HelpText[j]);
- <a name="l03038"></a>03038 XDrawImageString(display,HelpWindow,gc,x,y,HelpText[j],l);
- <a name="l03039"></a>03039 }
- <a name="l03040"></a>03040 }
- <a name="l03041"></a>03041
- <a name="l03042"></a><a class="code" href="pumax_8c.html#a8a5aec9b47f5687c664df38d92daccf2">03042</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a8a5aec9b47f5687c664df38d92daccf2">DisplayHelpWindow</a>(<span class="keywordtype">void</span>)
- <a name="l03043"></a>03043 {
- <a name="l03044"></a>03044 <span class="keywordtype">int</span> x,y,w,h;
- <a name="l03045"></a>03045 <span class="keywordtype">char</span> *HelpTitle = <span class="stringliteral">"Help"</span>;
- <a name="l03046"></a>03046
- <a name="l03047"></a>03047 w = BigFontWidth * (strlen(HelpText[0])+1);
- <a name="l03048"></a>03048 h = BigFontHeight * (HelpLines + 1);
- <a name="l03049"></a>03049 x = (ScreenW - w) / 2;
- <a name="l03050"></a>03050 y = (ScreenH - h) / 2;
- <a name="l03051"></a>03051 HelpWindow = XCreateSimpleWindow(display,RootWindow(display,screen_num),
- <a name="l03052"></a>03052 x,y,w,h,BorderWidth,Yellow.pixel,DarkBlue.pixel);
- <a name="l03053"></a>03053 XStringListToTextProperty(&HelpTitle,1,&HelpName);
- <a name="l03054"></a>03054 XSetWMProtocols(display,HelpWindow,&Delwin,1);
- <a name="l03055"></a>03055 XSetWMProperties(display,HelpWindow,&HelpName,NULL,NULL,0,NULL,NULL,NULL);
- <a name="l03056"></a>03056 XSelectInput(display,HelpWindow,ButtonPressMask | ExposureMask);
- <a name="l03057"></a>03057 XMapWindow(display,HelpWindow);
- <a name="l03058"></a>03058 XMoveWindow(display,HelpWindow,x,y);
- <a name="l03059"></a>03059 <a class="code" href="pumax_8c.html#aba750e7646eb34565d33fea6f31b676b">DrawHelpWindow</a>();
- <a name="l03060"></a>03060 }
- <a name="l03061"></a>03061
- <a name="l03062"></a><a class="code" href="pumax_8c.html#a535c697445b712fe16a24d9050968306">03062</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a535c697445b712fe16a24d9050968306">HitGridButton</a>(XEvent* xe)
- <a name="l03063"></a>03063 {
- <a name="l03064"></a>03064 <span class="keywordflow">return</span> (
- <a name="l03065"></a>03065 (xe->xbutton.button == Button1) &&
- <a name="l03066"></a>03066 (xe->xbutton.x >= Grid_XL ) &&
- <a name="l03067"></a>03067 (xe->xbutton.x <= Grid_XH ) &&
- <a name="l03068"></a>03068 (xe->xbutton.y >= Grid_YL ) &&
- <a name="l03069"></a>03069 (xe->xbutton.y <= Grid_YH ));
- <a name="l03070"></a>03070 }
- <a name="l03071"></a>03071
- <a name="l03072"></a><a class="code" href="pumax_8c.html#a2068accf6bb5b7d5b33dd6289b1f5f02">03072</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a2068accf6bb5b7d5b33dd6289b1f5f02">HitPauseButton</a>(XEvent* xe)
- <a name="l03073"></a>03073 {
- <a name="l03074"></a>03074 <span class="keywordflow">return</span> (
- <a name="l03075"></a>03075 (xe->xbutton.button == Button1) &&
- <a name="l03076"></a>03076 (xe->xbutton.x >= Pause_XL-2 ) &&
- <a name="l03077"></a>03077 (xe->xbutton.x <= Pause_XH+2 ) &&
- <a name="l03078"></a>03078 (xe->xbutton.y >= Pause_YL-2 ) &&
- <a name="l03079"></a>03079 (xe->xbutton.y <= Pause_YH+2 ));
- <a name="l03080"></a>03080 }
- <a name="l03081"></a>03081
- <a name="l03082"></a><a class="code" href="pumax_8c.html#a9d02ed3207b28b02c7cc0ea8c3f51339">03082</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a9d02ed3207b28b02c7cc0ea8c3f51339">HitStartButton</a>(XEvent* xe)
- <a name="l03083"></a>03083 {
- <a name="l03084"></a>03084 <span class="keywordflow">return</span> (
- <a name="l03085"></a>03085 (xe->xbutton.button == Button1) &&
- <a name="l03086"></a>03086 (xe->xbutton.x >= Start_XL-2 ) &&
- <a name="l03087"></a>03087 (xe->xbutton.x <= Start_XH+2 ) &&
- <a name="l03088"></a>03088 (xe->xbutton.y >= Start_YL-2 ) &&
- <a name="l03089"></a>03089 (xe->xbutton.y <= Start_YH+2 ));
- <a name="l03090"></a>03090 }
- <a name="l03091"></a>03091
- <a name="l03092"></a><a class="code" href="pumax_8c.html#a4ee12e86b4f071483510dac61cf7a92a">03092</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a4ee12e86b4f071483510dac61cf7a92a">HitStopButton</a>(XEvent* xe)
- <a name="l03093"></a>03093 {
- <a name="l03094"></a>03094 <span class="keywordflow">return</span> (
- <a name="l03095"></a>03095 (xe->xbutton.button == Button1) &&
- <a name="l03096"></a>03096 (xe->xbutton.x >= Stop_XL-2 ) &&
- <a name="l03097"></a>03097 (xe->xbutton.x <= Stop_XH+2 ) &&
- <a name="l03098"></a>03098 (xe->xbutton.y >= Stop_YL-2 ) &&
- <a name="l03099"></a>03099 (xe->xbutton.y <= Stop_YH+2 ));
- <a name="l03100"></a>03100 }
- <a name="l03101"></a>03101
- <a name="l03102"></a><a class="code" href="pumax_8c.html#a15071e2ea43672ffd1cefb9c61903c75">03102</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a15071e2ea43672ffd1cefb9c61903c75">HitHelpButton</a>(XEvent* xe)
- <a name="l03103"></a>03103 {
- <a name="l03104"></a>03104 <span class="keywordflow">return</span> (
- <a name="l03105"></a>03105 (xe->xbutton.button == Button1) &&
- <a name="l03106"></a>03106 (xe->xbutton.x >= Help_XL-2 ) &&
- <a name="l03107"></a>03107 (xe->xbutton.x <= Help_XH+2 ) &&
- <a name="l03108"></a>03108 (xe->xbutton.y >= Help_YL-2 ) &&
- <a name="l03109"></a>03109 (xe->xbutton.y <= Help_YH+2 ));
- <a name="l03110"></a>03110 }
- <a name="l03111"></a>03111
- <a name="l03112"></a><a class="code" href="pumax_8c.html#a426fec9e632373d9e59e1a060447b47d">03112</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a426fec9e632373d9e59e1a060447b47d">HitPlusButton</a>(XEvent* xe)
- <a name="l03113"></a>03113 {
- <a name="l03114"></a>03114 <span class="keywordflow">return</span> (
- <a name="l03115"></a>03115 (xe->xbutton.button == Button1) &&
- <a name="l03116"></a>03116 (xe->xbutton.x >= Plus_XL ) &&
- <a name="l03117"></a>03117 (xe->xbutton.x <= Plus_XH ) &&
- <a name="l03118"></a>03118 (xe->xbutton.y >= Plus_YL ) &&
- <a name="l03119"></a>03119 (xe->xbutton.y <= Plus_YH ));
- <a name="l03120"></a>03120 }
- <a name="l03121"></a>03121
- <a name="l03122"></a><a class="code" href="pumax_8c.html#aa59ba543293311702ee814a61ca43df0">03122</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#aa59ba543293311702ee814a61ca43df0">HitFFWDButton</a>(XEvent* xe)
- <a name="l03123"></a>03123 {
- <a name="l03124"></a>03124 <span class="keywordflow">return</span> (
- <a name="l03125"></a>03125 (xe->xbutton.button == Button1) &&
- <a name="l03126"></a>03126 (xe->xbutton.x >= FFWD_XL ) &&
- <a name="l03127"></a>03127 (xe->xbutton.x <= FFWD_XH ) &&
- <a name="l03128"></a>03128 (xe->xbutton.y >= FFWD_YL ) &&
- <a name="l03129"></a>03129 (xe->xbutton.y <= FFWD_YH ));
- <a name="l03130"></a>03130 }
- <a name="l03131"></a>03131
- <a name="l03132"></a><a class="code" href="pumax_8c.html#aff6cd4c66b167fb04bc39da7db334ee1">03132</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#aff6cd4c66b167fb04bc39da7db334ee1">HitMinusButton</a>(XEvent* xe)
- <a name="l03133"></a>03133 {
- <a name="l03134"></a>03134 <span class="keywordflow">return</span> (
- <a name="l03135"></a>03135 (xe->xbutton.button == Button1) &&
- <a name="l03136"></a>03136 (xe->xbutton.x >= Minus_XL ) &&
- <a name="l03137"></a>03137 (xe->xbutton.x <= Minus_XH ) &&
- <a name="l03138"></a>03138 (xe->xbutton.y >= Minus_YL ) &&
- <a name="l03139"></a>03139 (xe->xbutton.y <= Minus_YH ));
- <a name="l03140"></a>03140 }
- <a name="l03141"></a>03141
- <a name="l03142"></a><a class="code" href="pumax_8c.html#a3f7d08865453b506505be1652fa245e6">03142</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a3f7d08865453b506505be1652fa245e6">HitFBWDButton</a>(XEvent* xe)
- <a name="l03143"></a>03143 {
- <a name="l03144"></a>03144 <span class="keywordflow">return</span> (
- <a name="l03145"></a>03145 (xe->xbutton.button == Button1) &&
- <a name="l03146"></a>03146 (xe->xbutton.x >= FBWD_XL ) &&
- <a name="l03147"></a>03147 (xe->xbutton.x <= FBWD_XH ) &&
- <a name="l03148"></a>03148 (xe->xbutton.y >= FBWD_YL ) &&
- <a name="l03149"></a>03149 (xe->xbutton.y <= FBWD_YH ));
- <a name="l03150"></a>03150 }
- <a name="l03151"></a>03151
- <a name="l03152"></a><a class="code" href="pumax_8c.html#ac492dd7b5f6a98f919a543e46699d8fc">03152</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ac492dd7b5f6a98f919a543e46699d8fc">HitUpperPanel</a>(XEvent* xe)
- <a name="l03153"></a>03153 {
- <a name="l03154"></a>03154 <span class="keywordflow">return</span> (
- <a name="l03155"></a>03155 (xe->xbutton.button == Button1) &&
- <a name="l03156"></a>03156 (xe->xbutton.x >= Parc_XL ) &&
- <a name="l03157"></a>03157 (xe->xbutton.x <= Parc_XH ) &&
- <a name="l03158"></a>03158 (xe->xbutton.y >= Parc_YL-Parc_YD ) &&
- <a name="l03159"></a>03159 (xe->xbutton.y <= Parc_YL ));
- <a name="l03160"></a>03160 }
- <a name="l03161"></a>03161
- <a name="l03162"></a><a class="code" href="pumax_8c.html#ad4ec717b0a474b6ff5e69793616e634b">03162</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ad4ec717b0a474b6ff5e69793616e634b">HitLowerPanel</a>(XEvent* xe)
- <a name="l03163"></a>03163 {
- <a name="l03164"></a>03164 <span class="keywordflow">return</span> (
- <a name="l03165"></a>03165 (xe->xbutton.button == Button1) &&
- <a name="l03166"></a>03166 (xe->xbutton.x >= Parc_XL ) &&
- <a name="l03167"></a>03167 (xe->xbutton.x <= Parc_XH ) &&
- <a name="l03168"></a>03168 (xe->xbutton.y >= Parc_YH ) &&
- <a name="l03169"></a>03169 (xe->xbutton.y <= Parc_YH+Parc_YD));
- <a name="l03170"></a>03170 }
- <a name="l03171"></a>03171
- <a name="l03172"></a><a class="code" href="pumax_8c.html#af8c4e537e83688ce6f731380cfa7a9fb">03172</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#af8c4e537e83688ce6f731380cfa7a9fb">HitWindowSelect</a>(XEvent* xe)
- <a name="l03173"></a>03173 {
- <a name="l03174"></a>03174 <span class="keywordflow">if</span> (
- <a name="l03175"></a>03175 (xe->xbutton.button == Button1) &&
- <a name="l03176"></a>03176 (xe->xbutton.x >= Wbox_XL) &&
- <a name="l03177"></a>03177 (xe->xbutton.x <= Wbox_XH) &&
- <a name="l03178"></a>03178 (xe->xbutton.y >= Wbox_YL) &&
- <a name="l03179"></a>03179 (xe->xbutton.y <= Wbox_YH))
- <a name="l03180"></a>03180 <span class="keywordflow">return</span> (xe->xbutton.y / FixFontHeight); <span class="comment">/* Window number */</span>
- <a name="l03181"></a>03181 <span class="keywordflow">else</span> <span class="keywordflow">return</span> -1;
- <a name="l03182"></a>03182 }
- <a name="l03183"></a>03183
- <a name="l03184"></a><a class="code" href="pumax_8c.html#af675133ed1eecfa06b0b58d820550268">03184</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#af675133ed1eecfa06b0b58d820550268">OnMouseClick</a>(<span class="keywordtype">void</span>)
- <a name="l03185"></a>03185 {
- <a name="l03186"></a>03186 <span class="keywordtype">int</span> w;
- <a name="l03187"></a>03187
- <a name="l03188"></a>03188 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a4ee12e86b4f071483510dac61cf7a92a">HitStopButton</a>(&CowEvent))
- <a name="l03189"></a>03189 {
- <a name="l03190"></a>03190 Shutdown = 1;
- <a name="l03191"></a>03191 }
- <a name="l03192"></a>03192 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a9d02ed3207b28b02c7cc0ea8c3f51339">HitStartButton</a>(&CowEvent))
- <a name="l03193"></a>03193 {
- <a name="l03194"></a>03194 Paused = 0;
- <a name="l03195"></a>03195 XSetWMName(display,Cow,&WinconName1);
- <a name="l03196"></a>03196 }
- <a name="l03197"></a>03197 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a535c697445b712fe16a24d9050968306">HitGridButton</a>(&CowEvent))
- <a name="l03198"></a>03198 {
- <a name="l03199"></a>03199 Grid = !<a class="code" href="pumax_8c.html#a9666b9253809d418e00bcc929ee41c7d">Grid</a>;
- <a name="l03200"></a>03200 <a class="code" href="pumax_8c.html#a2ddd057b95fbe6c728ffa0675b8d079f">ShowGridStatus</a>();
- <a name="l03201"></a>03201 <span class="keywordflow">for</span> (w=0 ; w < <a class="code" href="pumax_8c.html#a02d2c0dc228849a8b05c5e902a551ca9">NUMWIN</a> ; ++w) RedrawFlag[w] = 1;
- <a name="l03202"></a>03202 }
- <a name="l03203"></a>03203 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a2068accf6bb5b7d5b33dd6289b1f5f02">HitPauseButton</a>(&CowEvent))
- <a name="l03204"></a>03204 {
- <a name="l03205"></a>03205 <span class="keywordflow">if</span> (Paused)
- <a name="l03206"></a>03206 {
- <a name="l03207"></a>03207 Paused = 0;
- <a name="l03208"></a>03208 XSetWMName(display,Cow,&WinconName1);
- <a name="l03209"></a>03209 }
- <a name="l03210"></a>03210 <span class="keywordflow">else</span>
- <a name="l03211"></a>03211 {
- <a name="l03212"></a>03212 Paused = 1;
- <a name="l03213"></a>03213 XSetWMName(display,Cow,&WinconPause);
- <a name="l03214"></a>03214 }
- <a name="l03215"></a>03215 }
- <a name="l03216"></a>03216 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a15071e2ea43672ffd1cefb9c61903c75">HitHelpButton</a>(&CowEvent))
- <a name="l03217"></a>03217 {
- <a name="l03218"></a>03218 <span class="keywordflow">if</span> (!HelpWindow) <a class="code" href="pumax_8c.html#a8a5aec9b47f5687c664df38d92daccf2">DisplayHelpWindow</a>();
- <a name="l03219"></a>03219 }
- <a name="l03220"></a>03220 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((w = <a class="code" href="pumax_8c.html#af8c4e537e83688ce6f731380cfa7a9fb">HitWindowSelect</a>(&CowEvent)) >= 0)
- <a name="l03221"></a>03221 {
- <a name="l03222"></a>03222 <span class="keywordflow">if</span> (Win[w]) <a class="code" href="pumax_8c.html#a64f109d6e1965c07709ba668a8e0e349">CloseWindow</a>(w);
- <a name="l03223"></a>03223 <span class="keywordflow">else</span> <a class="code" href="pumax_8c.html#a3a74ca8916dc6e6193c5f4ef8abec8ea">ReopenWindow</a>(w);
- <a name="l03224"></a>03224 }
- <a name="l03225"></a>03225 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a426fec9e632373d9e59e1a060447b47d">HitPlusButton</a>(&CowEvent))
- <a name="l03226"></a>03226 {
- <a name="l03227"></a>03227 <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a4901f0bf816a2d336307e9e3fcc95d82">Val</a> += <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a8228d63eefa1fb42c060ab069bcf2a1b">Inc</a>;
- <a name="l03228"></a>03228 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi].Val > <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi].Max) <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a4901f0bf816a2d336307e9e3fcc95d82">Val</a> = <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a01b1f457258f82282fdeeb6d8d4fbd8b">Max</a>;
- <a name="l03229"></a>03229 }
- <a name="l03230"></a>03230 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#aa59ba543293311702ee814a61ca43df0">HitFFWDButton</a>(&CowEvent))
- <a name="l03231"></a>03231 {
- <a name="l03232"></a>03232 <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a4901f0bf816a2d336307e9e3fcc95d82">Val</a> += 10.0 * <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a8228d63eefa1fb42c060ab069bcf2a1b">Inc</a>;
- <a name="l03233"></a>03233 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi].Val > <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi].Max) <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a4901f0bf816a2d336307e9e3fcc95d82">Val</a> = <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a01b1f457258f82282fdeeb6d8d4fbd8b">Max</a>;
- <a name="l03234"></a>03234 }
- <a name="l03235"></a>03235 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#aff6cd4c66b167fb04bc39da7db334ee1">HitMinusButton</a>(&CowEvent))
- <a name="l03236"></a>03236 {
- <a name="l03237"></a>03237 <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a4901f0bf816a2d336307e9e3fcc95d82">Val</a> -= <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a8228d63eefa1fb42c060ab069bcf2a1b">Inc</a>;
- <a name="l03238"></a>03238 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi].Val < <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi].Min) <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a4901f0bf816a2d336307e9e3fcc95d82">Val</a> = <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a2a2d6960e03fa37291f0fff4402f4a38">Min</a>;
- <a name="l03239"></a>03239 }
- <a name="l03240"></a>03240 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a3f7d08865453b506505be1652fa245e6">HitFBWDButton</a>(&CowEvent))
- <a name="l03241"></a>03241 {
- <a name="l03242"></a>03242 <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a4901f0bf816a2d336307e9e3fcc95d82">Val</a> -= 10.0 * <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a8228d63eefa1fb42c060ab069bcf2a1b">Inc</a>;
- <a name="l03243"></a>03243 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi].Val < <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[cpi].Min) <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a4901f0bf816a2d336307e9e3fcc95d82">Val</a> = <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>].<a class="code" href="struct_parc_struct.html#a2a2d6960e03fa37291f0fff4402f4a38">Min</a>;
- <a name="l03244"></a>03244 }
- <a name="l03245"></a>03245 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#ac492dd7b5f6a98f919a543e46699d8fc">HitUpperPanel</a>(&CowEvent) && cpi > 0) --<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>;
- <a name="l03246"></a>03246 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#ad4ec717b0a474b6ff5e69793616e634b">HitLowerPanel</a>(&CowEvent) && cpi < Parcs-1) ++<a class="code" href="pumax_8c.html#ae660f447290dcbe0903af3b8bbff9450">cpi</a>;
- <a name="l03247"></a>03247 }
- <a name="l03248"></a>03248
- <a name="l03249"></a>03249
- <a name="l03250"></a><a class="code" href="pumax_8c.html#ac78f1f279638bfd177687a680c4c21ce">03250</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#ac78f1f279638bfd177687a680c4c21ce">SwitchIndez</a>(<span class="keywordtype">int</span> w, <span class="keywordtype">int</span> d)
- <a name="l03251"></a>03251 {
- <a name="l03252"></a>03252 <span class="keywordtype">int</span> jlat;
- <a name="l03253"></a>03253 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> delphi;
- <a name="l03254"></a>03254 <span class="keywordtype">char</span> *lpt;
- <a name="l03255"></a>03255 <span class="keywordtype">char</span> levstr[20];
- <a name="l03256"></a>03256
- <a name="l03257"></a>03257 <span class="keywordflow">if</span> (Indez[w] < 0 || Indez[w] >= MaxZ[w])
- <a name="l03258"></a>03258 {
- <a name="l03259"></a>03259 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>) printf(<span class="stringliteral">"### Indez[%d] = %d\n"</span>,w,Indez[w]);
- <a name="l03260"></a>03260 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>) printf(<span class="stringliteral">"### MaxZ[%d] = %d\n"</span>,w, MaxZ[w]);
- <a name="l03261"></a>03261 Indez[w] = 0;
- <a name="l03262"></a>03262 }
- <a name="l03263"></a>03263 <span class="keywordflow">if</span> (Indez[w]+d < 0 ) <span class="keywordflow">return</span>;
- <a name="l03264"></a>03264 <span class="keywordflow">if</span> (Indez[w]+d >= MaxZ[w]) <span class="keywordflow">return</span>;
- <a name="l03265"></a>03265 Indez[w] += d;
- <a name="l03266"></a>03266 lpt = strstr(WindowTitle[w],<span class="stringliteral">"Level"</span>);
- <a name="l03267"></a>03267 <span class="keywordflow">if</span> (lpt)
- <a name="l03268"></a>03268 {
- <a name="l03269"></a>03269 sprintf(levstr,<span class="stringliteral">" %d"</span>,Indez[w]+1);
- <a name="l03270"></a>03270 strcpy(lpt+5,levstr);
- <a name="l03271"></a>03271 XStringListToTextProperty(&WindowTitle[w],1,WindowName+w);
- <a name="l03272"></a>03272 XSetWMProperties(display,Win[w],WindowName+w,NULL,
- <a name="l03273"></a>03273 NULL,0,&WinSizeHints,&wm_hints,&class_hints);
- <a name="l03274"></a>03274 LevelChanged[w] = 1;
- <a name="l03275"></a>03275 <span class="keywordflow">return</span>;
- <a name="l03276"></a>03276 }
- <a name="l03277"></a>03277 lpt = strstr(WindowTitle[w],<span class="stringliteral">"Latitude"</span>);
- <a name="l03278"></a>03278 <span class="keywordflow">if</span> (lpt)
- <a name="l03279"></a>03279 {
- <a name="l03280"></a>03280 delphi = 180.0 / MaxZ[w];
- <a name="l03281"></a>03281 jlat = 90.0 -Indez[w] * delphi - delphi * 0.5;
- <a name="l03282"></a>03282 <span class="keywordflow">if</span> (jlat > 0) sprintf(levstr,<span class="stringliteral">" %dN"</span>, jlat);
- <a name="l03283"></a>03283 <span class="keywordflow">else</span> sprintf(levstr,<span class="stringliteral">" %dS"</span>,-jlat);
- <a name="l03284"></a>03284 strcpy(lpt+8,levstr);
- <a name="l03285"></a>03285 XStringListToTextProperty(&WindowTitle[w],1,WindowName+w);
- <a name="l03286"></a>03286 XSetWMProperties(display,Win[w],WindowName+w,NULL,
- <a name="l03287"></a>03287 NULL,0,&WinSizeHints,&wm_hints,&class_hints);
- <a name="l03288"></a>03288 <span class="keywordflow">return</span>;
- <a name="l03289"></a>03289 }
- <a name="l03290"></a>03290 }
- <a name="l03291"></a>03291
- <a name="l03292"></a>03292
- <a name="l03293"></a><a class="code" href="pumax_8c.html#a5d7b22836449266ba8bd29a5f83e3c2b">03293</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a5d7b22836449266ba8bd29a5f83e3c2b">HandleEvents</a>(<span class="keywordtype">void</span>)
- <a name="l03294"></a>03294 {
- <a name="l03295"></a>03295 <span class="keywordtype">int</span> w,Key,KeyIndex;
- <a name="l03296"></a>03296 XEvent WinEvent;
- <a name="l03297"></a>03297
- <a name="l03298"></a>03298 <span class="keywordflow">if</span> (nstep == 1)
- <a name="l03299"></a>03299 {
- <a name="l03300"></a>03300 <a class="code" href="pumax_8c.html#a41f77efa657ce06e158034152384bf2e">RedrawControlWindow</a>();
- <a name="l03301"></a>03301 Paused = 1; <span class="comment">/* Start in pause mode */</span>
- <a name="l03302"></a>03302 }
- <a name="l03303"></a>03303
- <a name="l03304"></a>03304
- <a name="l03305"></a>03305 <span class="keywordflow">do</span>
- <a name="l03306"></a>03306 {
- <a name="l03307"></a>03307 <span class="comment">/* Check for Termination */</span>
- <a name="l03308"></a>03308
- <a name="l03309"></a>03309 <span class="keywordflow">if</span> (XCheckTypedWindowEvent(display,Cow,ClientMessage,&WinEvent))
- <a name="l03310"></a>03310 {
- <a name="l03311"></a>03311 <span class="comment">/* printf("delwin %d\n",WinEvent.xclient.data.l[0]); */</span>
- <a name="l03312"></a>03312 Shutdown = 1;
- <a name="l03313"></a>03313 <span class="keywordflow">return</span>;
- <a name="l03314"></a>03314 }
- <a name="l03315"></a>03315
- <a name="l03316"></a>03316 <span class="comment">/* Check for user request to close windows */</span>
- <a name="l03317"></a>03317
- <a name="l03318"></a>03318 <span class="keywordflow">for</span> (w=0 ; w < <a class="code" href="pumax_8c.html#a2364498cd60ebd2201eeef32ce76e882">NumWin</a> ; ++w)
- <a name="l03319"></a>03319 <span class="keywordflow">if</span> (Win[w])
- <a name="l03320"></a>03320 {
- <a name="l03321"></a>03321 <span class="keywordflow">if</span> (XCheckTypedWindowEvent(display,Win[w],ClientMessage,&WinEvent))
- <a name="l03322"></a>03322 <a class="code" href="pumax_8c.html#a64f109d6e1965c07709ba668a8e0e349">CloseWindow</a>(w);
- <a name="l03323"></a>03323 }
- <a name="l03324"></a>03324
- <a name="l03325"></a>03325 <span class="comment">/* Check for user request to close help window */</span>
- <a name="l03326"></a>03326
- <a name="l03327"></a>03327 <span class="keywordflow">if</span> (HelpWindow && XCheckTypedWindowEvent(display,HelpWindow,ClientMessage,&WinEvent))
- <a name="l03328"></a>03328 {
- <a name="l03329"></a>03329 XDestroyWindow(display,HelpWindow);
- <a name="l03330"></a>03330 HelpWindow = 0;
- <a name="l03331"></a>03331 }
- <a name="l03332"></a>03332
- <a name="l03333"></a>03333 <span class="comment">/* Check for mouse click */</span>
- <a name="l03334"></a>03334
- <a name="l03335"></a>03335 <span class="keywordflow">if</span> (XCheckTypedWindowEvent(display,Cow,ButtonPress,&CowEvent))
- <a name="l03336"></a>03336 {
- <a name="l03337"></a>03337 <a class="code" href="pumax_8c.html#af675133ed1eecfa06b0b58d820550268">OnMouseClick</a>();
- <a name="l03338"></a>03338 <a class="code" href="pumax_8c.html#a41f77efa657ce06e158034152384bf2e">RedrawControlWindow</a>();
- <a name="l03339"></a>03339 }
- <a name="l03340"></a>03340
- <a name="l03341"></a>03341 <span class="comment">/* Check for mouseclicks and expose events */</span>
- <a name="l03342"></a>03342
- <a name="l03343"></a>03343 <span class="keywordflow">for</span> (w=0 ; w < <a class="code" href="pumax_8c.html#a2364498cd60ebd2201eeef32ce76e882">NumWin</a> ; ++w)
- <a name="l03344"></a>03344 <span class="keywordflow">if</span> (Win[w])
- <a name="l03345"></a>03345 {
- <a name="l03346"></a>03346 <span class="keywordflow">if</span> (XCheckTypedWindowEvent(display,Win[w],ButtonPress,&CowEvent))
- <a name="l03347"></a>03347 {
- <a name="l03348"></a>03348 <span class="keywordflow">if</span> (CowEvent.xbutton.button == Button1) <a class="code" href="pumax_8c.html#ac78f1f279638bfd177687a680c4c21ce">SwitchIndez</a>(w,-1);
- <a name="l03349"></a>03349 <span class="keywordflow">if</span> (CowEvent.xbutton.button == Button3) <a class="code" href="pumax_8c.html#ac78f1f279638bfd177687a680c4c21ce">SwitchIndez</a>(w, 1);
- <a name="l03350"></a>03350 <span class="keywordflow">if</span> (CowEvent.xbutton.button == Button2)
- <a name="l03351"></a>03351 {
- <a name="l03352"></a>03352 <span class="keywordflow">if</span> (++MapPro[w] >= <a class="code" href="pumax_8c.html#a3b66883efb152a59e42802d74245ae5a">MAXMAPS</a>) MapPro[w] = 0;
- <a name="l03353"></a>03353 <span class="keywordflow">if</span> (MapPro[w] == <a class="code" href="pumax_8c.html#aae4090be0e30c18b0f22650479767d8f">AZIMUTHAL</a> &&
- <a name="l03354"></a>03354 (<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].Plot != <a class="code" href="pumax_8c.html#a3e3bcad4c273544328bcdcaef35c3852">MAPHOR</a> && <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].Plot != <a class="code" href="pumax_8c.html#a1572b520f538d357372e96d0185275e5">MAPTRA</a>))
- <a name="l03355"></a>03355 MapPro[w] = 0;
- <a name="l03356"></a>03356 }
- <a name="l03357"></a>03357 RedrawFlag[w] = 1;
- <a name="l03358"></a>03358 }
- <a name="l03359"></a>03359 <span class="keywordflow">if</span> (XCheckTypedWindowEvent(display,Win[w],KeyPress,&CowEvent))
- <a name="l03360"></a>03360 {
- <a name="l03361"></a>03361 KeyIndex = (CowEvent.xkey.keycode - <a class="code" href="pumax_8c.html#a7d187d3be57e785fee45a7dfc5475595">FirstKey</a>) * SymsPerKey;
- <a name="l03362"></a>03362 Key = KeyMap[KeyIndex];
- <a name="l03363"></a>03363 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>) printf(<span class="stringliteral">"Windows %d got keyindex %d with symbol %x\n"</span>,w,KeyIndex,Key);
- <a name="l03364"></a>03364 <span class="keywordflow">if</span> (Key == <a class="code" href="pumax_8c.html#ae880d2ccffb14a9a68b859d09f22e12a">ROTATE_LEFT</a> && <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].f < 5) <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a7c3018a3883c438e08c5632a49e39c66">f</a>++;
- <a name="l03365"></a>03365 <span class="keywordflow">if</span> (Key == <a class="code" href="pumax_8c.html#a03653d3bb216e366e5f0144e79554a39">ROTATE_RIGHT</a> && <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].f > -5) <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a7c3018a3883c438e08c5632a49e39c66">f</a>--;
- <a name="l03366"></a>03366 <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a0c135dc0852d411fd87b7ac84ba55664">r</a> = <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a7c3018a3883c438e08c5632a49e39c66">f</a> * <a class="code" href="pumax_8c.html#aa62b318359708cb3e3c6f55cac884a6f">RotInc</a>;
- <a name="l03367"></a>03367 <span class="keywordflow">if</span> (Key == XK_Up ) <a class="code" href="pumax_8c.html#ac78f1f279638bfd177687a680c4c21ce">SwitchIndez</a>(w,-1);
- <a name="l03368"></a>03368 <span class="keywordflow">if</span> (Key == XK_Down) <a class="code" href="pumax_8c.html#ac78f1f279638bfd177687a680c4c21ce">SwitchIndez</a>(w, 1);
- <a name="l03369"></a>03369 }
- <a name="l03370"></a>03370 <span class="keywordflow">if</span> (Paused)
- <a name="l03371"></a>03371 <span class="keywordflow">if</span> (XCheckTypedWindowEvent(display,Win[w],Expose,&CowEvent))
- <a name="l03372"></a>03372 <a class="code" href="pumax_8c.html#a2f9a1f5b15d5b0b8305a40270b38ab97">RedrawIsoWindow</a>(w);
- <a name="l03373"></a>03373 }
- <a name="l03374"></a>03374
- <a name="l03375"></a>03375 <span class="keywordflow">if</span> (XCheckTypedWindowEvent(display,Cow,Expose,&CowEvent))
- <a name="l03376"></a>03376 <a class="code" href="pumax_8c.html#a41f77efa657ce06e158034152384bf2e">RedrawControlWindow</a>();
- <a name="l03377"></a>03377
- <a name="l03378"></a>03378 <span class="keywordflow">if</span> (HelpWindow && XCheckTypedWindowEvent(display,HelpWindow,Expose,&CowEvent))
- <a name="l03379"></a>03379 <a class="code" href="pumax_8c.html#aba750e7646eb34565d33fea6f31b676b">DrawHelpWindow</a>();
- <a name="l03380"></a>03380
- <a name="l03381"></a>03381 } <span class="keywordflow">while</span> (Paused && !Shutdown);
- <a name="l03382"></a>03382 }
- <a name="l03383"></a>03383
- <a name="l03384"></a><a class="code" href="pumax_8c.html#a3e6d6484cbc802c71aa4d660b3e6298c">03384</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a3e6d6484cbc802c71aa4d660b3e6298c">guiclose_</a>(<span class="keywordtype">void</span>)
- <a name="l03385"></a>03385 {
- <a name="l03386"></a>03386 <span class="keywordtype">int</span> w;
- <a name="l03387"></a>03387
- <a name="l03388"></a>03388 <span class="keywordflow">if</span> (MRpid >= 0) <span class="keywordflow">return</span>; <span class="comment">// Don't wait if multiple instances</span>
- <a name="l03389"></a>03389 XSetWMName(display,Cow,&WinconName3);
- <a name="l03390"></a>03390
- <a name="l03391"></a>03391 <span class="keywordflow">do</span>
- <a name="l03392"></a>03392 {
- <a name="l03393"></a>03393 <span class="keywordflow">for</span> (w=0 ; w < <a class="code" href="pumax_8c.html#a2364498cd60ebd2201eeef32ce76e882">NumWin</a> ; ++w)
- <a name="l03394"></a>03394 <span class="keywordflow">if</span> (Win[w])
- <a name="l03395"></a>03395 {
- <a name="l03396"></a>03396 <span class="keywordflow">if</span> (XCheckTypedWindowEvent(display,Win[w],Expose,&CowEvent))
- <a name="l03397"></a>03397 <a class="code" href="pumax_8c.html#a2f9a1f5b15d5b0b8305a40270b38ab97">RedrawIsoWindow</a>(w);
- <a name="l03398"></a>03398 }
- <a name="l03399"></a>03399
- <a name="l03400"></a>03400 <span class="keywordflow">if</span> (XCheckTypedWindowEvent(display,Cow,Expose,&CowEvent))
- <a name="l03401"></a>03401 <a class="code" href="pumax_8c.html#a41f77efa657ce06e158034152384bf2e">RedrawControlWindow</a>();
- <a name="l03402"></a>03402 }
- <a name="l03403"></a>03403 <span class="keywordflow">while</span> (!(XCheckTypedWindowEvent(display,Cow,ButtonPress,&CowEvent) &&
- <a name="l03404"></a>03404 <a class="code" href="pumax_8c.html#a4ee12e86b4f071483510dac61cf7a92a">HitStopButton</a>(&CowEvent)));
- <a name="l03405"></a>03405
- <a name="l03406"></a>03406 <span class="comment">// XCloseDisplay(display); // segmentation fault on sun compiler!</span>
- <a name="l03407"></a>03407 }
- <a name="l03408"></a>03408
- <a name="l03409"></a><a class="code" href="pumax_8c.html#aeddd52f215d48c55293dfbc55156c780">03409</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#aeddd52f215d48c55293dfbc55156c780">SaveConfig</a>(<span class="keywordtype">void</span>)
- <a name="l03410"></a>03410 {
- <a name="l03411"></a>03411 <span class="keywordtype">int</span> i;
- <a name="l03412"></a>03412 FILE *scp;
- <a name="l03413"></a>03413 <a class="code" href="pumax_8c.html#a83e35c70462fc81d9b622790c8661e8e">INTXS</a> X,Y,xp,yp;
- <a name="l03414"></a>03414 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> w,W,H,border,depth;
- <a name="l03415"></a>03415 Window Rootwin,Child;
- <a name="l03416"></a>03416 XWindowAttributes RootAtt;
- <a name="l03417"></a>03417
- <a name="l03418"></a>03418 scp = fopen(GUI_config,<span class="stringliteral">"w"</span>);
- <a name="l03419"></a>03419 <span class="keywordflow">if</span> (scp == NULL) <span class="keywordflow">return</span>;
- <a name="l03420"></a>03420
- <a name="l03421"></a>03421 <span class="comment">/* Save window properties */</span>
- <a name="l03422"></a>03422
- <a name="l03423"></a>03423 fprintf(scp,<span class="stringliteral">"Hamburg GUI Config File Version 16\n"</span>);
- <a name="l03424"></a>03424 fprintf(scp,<span class="stringliteral">"Screen: %dx%d\n\n"</span>,ScreenW,ScreenH);
- <a name="l03425"></a>03425 fprintf(scp,<span class="stringliteral">"WinRows = %d\n"</span>,WinRows);
- <a name="l03426"></a>03426 fprintf(scp,<span class="stringliteral">"WinCols = %d\n"</span>,WinCols);
- <a name="l03427"></a>03427 <span class="keywordflow">for</span> (w=0 ; w < <a class="code" href="pumax_8c.html#a2364498cd60ebd2201eeef32ce76e882">NumWin</a> ; ++w)
- <a name="l03428"></a>03428 {
- <a name="l03429"></a>03429 fprintf(scp,<span class="stringliteral">"\n[Window %02d]\n"</span>,w);
- <a name="l03430"></a>03430 fprintf(scp,<span class="stringliteral">"Array:%s\n"</span>,<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].array_name);
- <a name="l03431"></a>03431 fprintf(scp,<span class="stringliteral">"Plot:%s\n"</span>,<a class="code" href="pumax_8c.html#a521281f5e10ed8f5e4cdb50ead3b2612">IsoNames</a>[<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].Plot]);
- <a name="l03432"></a>03432 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].Plot == <a class="code" href="pumax_8c.html#a2f1d89ef346ef5189b556085f4553c4c">ISOHOR</a> || <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].Plot == <a class="code" href="pumax_8c.html#a3e3bcad4c273544328bcdcaef35c3852">MAPHOR</a> ||
- <a name="l03433"></a>03433 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].Plot == <a class="code" href="pumax_8c.html#a4c30d0a50533694deda0fcf3551b6935">ISOTRA</a> || <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].Plot == <a class="code" href="pumax_8c.html#a1572b520f538d357372e96d0185275e5">MAPTRA</a>)
- <a name="l03434"></a>03434 {
- <a name="l03435"></a>03435 fprintf(scp,<span class="stringliteral">"Projection:%s\n"</span>,ProNames[MapPro[w]]);
- <a name="l03436"></a>03436 fprintf(scp,<span class="stringliteral">"Rotation factor:%d\n"</span>,<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].f);
- <a name="l03437"></a>03437 }
- <a name="l03438"></a>03438 fprintf(scp,<span class="stringliteral">"Palette:%s\n"</span>,PalNames[<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].Palette]);
- <a name="l03439"></a>03439 fprintf(scp,<span class="stringliteral">"Title:%s\n"</span>,WindowTitle[w]+wto);
- <a name="l03440"></a>03440 <span class="keywordflow">if</span> (Win[w])
- <a name="l03441"></a>03441 {
- <a name="l03442"></a>03442 XGetGeometry(display,Win[w],&Rootwin,&xp,&yp,&W,&H,&border,&depth);
- <a name="l03443"></a>03443 XTranslateCoordinates(display,Win[w],Rootwin,0,0,&X,&Y,&Child);
- <a name="l03444"></a>03444 fprintf(scp,<span class="stringliteral">"Geometry: %4d %4d %4d %4d\n"</span>,W,H,X-WinLM,Y-WinTM);
- <a name="l03445"></a>03445 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>)
- <a name="l03446"></a>03446 {
- <a name="l03447"></a>03447 printf(<span class="stringliteral">"Geometry Window %d [%8x]: %4d / %4d %4d x %4d x %2d | %d\n"</span>,
- <a name="l03448"></a>03448 w,(<span class="keywordtype">int</span>)Win[w],xp,yp,W,H,depth,border);
- <a name="l03449"></a>03449 printf(<span class="stringliteral">"Translated UL corner: %4d / %4d\n"</span>,X,Y);
- <a name="l03450"></a>03450 }
- <a name="l03451"></a>03451 }
- <a name="l03452"></a>03452 <span class="keywordflow">else</span>
- <a name="l03453"></a>03453 fprintf(scp,<span class="stringliteral">"Inactive: %4d %4d %4d %4d\n"</span>,
- <a name="l03454"></a>03454 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].w,<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].h,<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].x,<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].y);
- <a name="l03455"></a>03455 }
- <a name="l03456"></a>03456 XGetGeometry(display,Cow,&Rootwin,&xp,&yp,&W,&H,&border,&depth);
- <a name="l03457"></a>03457 XTranslateCoordinates(display,Cow,Rootwin,0,0,&X,&Y,&Child);
- <a name="l03458"></a>03458 fprintf(scp,<span class="stringliteral">"\n[Control Window]\n"</span>);
- <a name="l03459"></a>03459 fprintf(scp,<span class="stringliteral">"Geometry: %4d %4d %4d %4d\n"</span>,W,H,X-WinLM,Y-WinTM);
- <a name="l03460"></a>03460
- <a name="l03461"></a>03461 <span class="comment">/* Scalar attributes for timeseries and tables */</span>
- <a name="l03462"></a>03462
- <a name="l03463"></a>03463 fprintf(scp,<span class="stringliteral">"\n# Scalar attributes for timeseries and table window\n"</span>);
- <a name="l03464"></a>03464
- <a name="l03465"></a>03465 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#a4444b7b37748213e596d8d51dfdb3315">Parcs</a> ; ++i)
- <a name="l03466"></a>03466 {
- <a name="l03467"></a>03467 fprintf(scp,<span class="stringliteral">"\n[Scalar %02d]\n"</span>,i);
- <a name="l03468"></a>03468 fprintf(scp,<span class="stringliteral">"Name:%s\n"</span>,TSName[i]);
- <a name="l03469"></a>03469 fprintf(scp,<span class="stringliteral">"Sub:%s\n"</span>,TSubsc[i]);
- <a name="l03470"></a>03470 fprintf(scp,<span class="stringliteral">"Unit:%s\n"</span>,TSUnit[i]);
- <a name="l03471"></a>03471 fprintf(scp,<span class="stringliteral">"Scale:%s\n"</span>,TScale[i]);
- <a name="l03472"></a>03472 }
- <a name="l03473"></a>03473
- <a name="l03474"></a>03474 <span class="comment">/* Scalar attributes for timeseries and tables */</span>
- <a name="l03475"></a>03475
- <a name="l03476"></a>03476 fprintf(scp,<span class="stringliteral">"\n# Parameter attributes for change menu\n"</span>);
- <a name="l03477"></a>03477
- <a name="l03478"></a>03478 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#a82714a35091aa707ef0bc4c0ad18d7b2">NUMSCALARS</a> ; ++i)
- <a name="l03479"></a>03479 {
- <a name="l03480"></a>03480 <span class="keywordflow">if</span> (strlen(<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[i].Name) == 0) <span class="keywordflow">break</span>;
- <a name="l03481"></a>03481 fprintf(scp,<span class="stringliteral">"\n[Parameter %02d]\n"</span>,i);
- <a name="l03482"></a>03482 fprintf(scp,<span class="stringliteral">"ParName:%s\n"</span>,<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[i].Name);
- <a name="l03483"></a>03483 fprintf(scp,<span class="stringliteral">"ParInc:%10.4f\n"</span>,<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[i].Inc);
- <a name="l03484"></a>03484 fprintf(scp,<span class="stringliteral">"ParMin:%10.4f\n"</span>,<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[i].Min);
- <a name="l03485"></a>03485 fprintf(scp,<span class="stringliteral">"ParMax:%10.4f\n"</span>,<a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[i].Max);
- <a name="l03486"></a>03486 }
- <a name="l03487"></a>03487
- <a name="l03488"></a>03488 fclose(scp);
- <a name="l03489"></a>03489 }
- <a name="l03490"></a>03490
- <a name="l03491"></a>03491
- <a name="l03492"></a><a class="code" href="pumax_8c.html#a47d2c6cfb8dd4bebb935c05cb54c9148">03492</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a47d2c6cfb8dd4bebb935c05cb54c9148">lp2ps</a>(<a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *a, <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *b)
- <a name="l03493"></a>03493 {
- <a name="l03494"></a>03494 <span class="keywordtype">int</span> i,j,k,l,k1,l1;
- <a name="l03495"></a>03495 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> xnp,ynp,xsp,ysp,dx,dy,x,y,lfa,ua,ub;
- <a name="l03496"></a>03496
- <a name="l03497"></a>03497 lfa = (DimX-1) / (2.0 * M_PI);
- <a name="l03498"></a>03498 xnp = (DimX-1) * 0.25;
- <a name="l03499"></a>03499 ynp = (DimY-1) * 0.50;
- <a name="l03500"></a>03500 xsp = (DimX-1) * 0.75;
- <a name="l03501"></a>03501 ysp = ynp;
- <a name="l03502"></a>03502
- <a name="l03503"></a>03503 <span class="comment">/* Northern hemisphere */</span>
- <a name="l03504"></a>03504
- <a name="l03505"></a>03505 <span class="keywordflow">for</span> (j = 0 ; j < <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a> ; ++j)
- <a name="l03506"></a>03506 <span class="keywordflow">for</span> (i = 0 ; i <= DimX/2 ; ++i)
- <a name="l03507"></a>03507 {
- <a name="l03508"></a>03508 dx = xnp - i;
- <a name="l03509"></a>03509 dy = ynp - j;
- <a name="l03510"></a>03510 x = atan2(dx,dy) * lfa;
- <a name="l03511"></a>03511 y = sqrt(dx * dx + dy * dy);
- <a name="l03512"></a>03512 <span class="keywordflow">if</span> (x < 0.0) x += (DimX-1);
- <a name="l03513"></a>03513 k = x;
- <a name="l03514"></a>03514 l = y;
- <a name="l03515"></a>03515 k1 = k + 1;
- <a name="l03516"></a>03516 <span class="keywordflow">if</span> (k1 >= DimX) k1 = 0;
- <a name="l03517"></a>03517 <span class="keywordflow">if</span> (l <= DimY/2+1)
- <a name="l03518"></a>03518 {
- <a name="l03519"></a>03519 ua = (k+1-x) * a[k+l*DimX] + (x-k) * a[k1+l*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>];
- <a name="l03520"></a>03520 ub = (k+1-x) * a[k+(l+1)*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>] + (x-k) * a[k+1+(l+1)*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>];
- <a name="l03521"></a>03521 b[i+j*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>] = (l+1-y) * ua + (y-l) * ub;
- <a name="l03522"></a>03522 }
- <a name="l03523"></a>03523 <span class="keywordflow">else</span> b[i+j*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>] = - 99999.0;
- <a name="l03524"></a>03524 }
- <a name="l03525"></a>03525
- <a name="l03526"></a>03526 <span class="comment">/* Souhern hemisphere */</span>
- <a name="l03527"></a>03527
- <a name="l03528"></a>03528 <span class="keywordflow">for</span> (j = 0 ; j < <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a> ; ++j)
- <a name="l03529"></a>03529 <span class="keywordflow">for</span> (i = DimX/2+1 ; i < <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a> ; ++i)
- <a name="l03530"></a>03530 {
- <a name="l03531"></a>03531 dx = i - xsp;
- <a name="l03532"></a>03532 dy = ysp - j;
- <a name="l03533"></a>03533 x = atan2(dx,dy) * lfa;
- <a name="l03534"></a>03534 y = (DimY-1) - sqrt(dx * dx + dy * dy);
- <a name="l03535"></a>03535 <span class="keywordflow">if</span> (x < 0.0) x += (DimX-1);
- <a name="l03536"></a>03536 k = x;
- <a name="l03537"></a>03537 l = y;
- <a name="l03538"></a>03538 k1 = k + 1;
- <a name="l03539"></a>03539 <span class="keywordflow">if</span> (k1 >= DimX) k1 = 0;
- <a name="l03540"></a>03540 <span class="keywordflow">if</span> (l >= DimY/2-3)
- <a name="l03541"></a>03541 {
- <a name="l03542"></a>03542 ua = (k+1-x) * a[k+l*DimX] + (x-k) * a[k1+l*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>];
- <a name="l03543"></a>03543 ub = (k+1-x) * a[k+(l+1)*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>] + (x-k) * a[k+1+(l+1)*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>];
- <a name="l03544"></a>03544 b[i+j*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>] = (l+1-y) * ua + (y-l) * ub;
- <a name="l03545"></a>03545 }
- <a name="l03546"></a>03546 <span class="keywordflow">else</span> b[i+j*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>] = - 99999.0;
- <a name="l03547"></a>03547 }
- <a name="l03548"></a>03548 }
- <a name="l03549"></a>03549
- <a name="l03550"></a>03550
- <a name="l03551"></a>03551 <span class="comment">/* ======================================================= */</span>
- <a name="l03552"></a>03552 <span class="comment">/* lp2az - transform lon/lat array to azimuthal projection */</span>
- <a name="l03553"></a>03553 <span class="comment">/* ======================================================= */</span>
- <a name="l03554"></a>03554
- <a name="l03555"></a><a class="code" href="pumax_8c.html#a1f2dead227675ed5a1344d3b1ce57fe3">03555</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a1f2dead227675ed5a1344d3b1ce57fe3">lp2az</a>(<a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *a, <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *b, <span class="keywordtype">float</span> laz)
- <a name="l03556"></a>03556 {
- <a name="l03557"></a>03557 <span class="keywordtype">int</span> x,y,dxc,k,k1,l;
- <a name="l03558"></a>03558 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> dx,dy,lam,rho,rad,phi,ua,ub,l00,p00,xpi,ypi;
- <a name="l03559"></a>03559
- <a name="l03560"></a>03560 rad = DimY >> 1;
- <a name="l03561"></a>03561 dxc = DimX >> 1;
- <a name="l03562"></a>03562 xpi = DimX / M_PI * 0.5;
- <a name="l03563"></a>03563 ypi = DimY / M_PI;
- <a name="l03564"></a>03564 l00 = (int)((laz * DimX) / 360 + dxc) % DimX;
- <a name="l03565"></a>03565 p00 = DimY / 2;
- <a name="l03566"></a>03566
- <a name="l03567"></a>03567 <span class="keywordflow">for</span> (y = 0 ; y < <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a> ; ++y)
- <a name="l03568"></a>03568 {
- <a name="l03569"></a>03569 dy = y - rad;
- <a name="l03570"></a>03570 phi = y;
- <a name="l03571"></a>03571 <span class="keywordflow">for</span> (x = 0 ; x < <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a> ; ++x)
- <a name="l03572"></a>03572 {
- <a name="l03573"></a>03573 dx = x - dxc;
- <a name="l03574"></a>03574 rho = sqrt(dx * dx + dy * dy);
- <a name="l03575"></a>03575 <span class="keywordflow">if</span> (rho < rad)
- <a name="l03576"></a>03576 {
- <a name="l03577"></a>03577 lam = l00 + xpi * atan2(dx / rad, cos(asin(rho / rad)));
- <a name="l03578"></a>03578 phi = p00 + ypi * asin(dy / rad);
- <a name="l03579"></a>03579 k = lam;
- <a name="l03580"></a>03580 k1 = k + 1;
- <a name="l03581"></a>03581 <span class="keywordflow">if</span> (k1 >= DimX) k1 = 0;
- <a name="l03582"></a>03582 l = phi;
- <a name="l03583"></a>03583 ua = (k+1-lam) * a[k+ l *DimX] + (lam-k) * a[k1 + l *<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>];
- <a name="l03584"></a>03584 ub = (k+1-lam) * a[k+(l+1)*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>] + (lam-k) * a[k+1+(l+1)*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>];
- <a name="l03585"></a>03585 b[x+y*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>] = (l+1-y) * ua + (y-l) * ub;
- <a name="l03586"></a>03586 }
- <a name="l03587"></a>03587 <span class="keywordflow">else</span> b[x+y*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>] = - 99999.0;
- <a name="l03588"></a>03588 }
- <a name="l03589"></a>03589 }
- <a name="l03590"></a>03590 }
- <a name="l03591"></a>03591
- <a name="l03592"></a><a class="code" href="pumax_8c.html#a76fadfb9ad5d4b5629b491009adc18ee">03592</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a76fadfb9ad5d4b5629b491009adc18ee">ShowGridCS</a>(<span class="keywordtype">void</span>)
- <a name="l03593"></a>03593 {
- <a name="l03594"></a>03594 <span class="keywordtype">int</span> jlev,jlat,x,y,len;
- <a name="l03595"></a>03595 <span class="keywordtype">float</span> dx,dy;
- <a name="l03596"></a>03596 <span class="keywordtype">char</span> Text[80];
- <a name="l03597"></a>03597
- <a name="l03598"></a>03598 <span class="comment">/* Grid for zonal mean cross sections */</span>
- <a name="l03599"></a>03599
- <a name="l03600"></a>03600 XSetForeground(display,gc,WhitePix);
- <a name="l03601"></a>03601 XSetBackground(display,gc,BlackPix);
- <a name="l03602"></a>03602 XSetLineAttributes(display,gc,1,LineOnOffDash,CapButt,JoinRound);
- <a name="l03603"></a>03603 dy = (InYSize - <a class="code" href="pumax_8c.html#a10481cd98c85988914fe8442f4ba3d83">OffY</a>) / (DimY - 1.0);
- <a name="l03604"></a>03604 <span class="keywordflow">for</span> (jlev = 1 ; jlev < DimY-1 ; ++jlev)
- <a name="l03605"></a>03605 {
- <a name="l03606"></a>03606 y = OffY + jlev * dy;
- <a name="l03607"></a>03607 XDrawLine(display,pix,gc,OffX,y,InXSize-1,y);
- <a name="l03608"></a>03608 }
- <a name="l03609"></a>03609 dx = (InXSize - <a class="code" href="pumax_8c.html#a67c8f2f939a4939efcfc51b1a2edff05">OffX</a>) / 6.0; <span class="comment">/* Every 30 degrees */</span>
- <a name="l03610"></a>03610 <span class="keywordflow">for</span> (jlat = 1 ; jlat < 6 ; ++jlat)
- <a name="l03611"></a>03611 {
- <a name="l03612"></a>03612 x = OffX + jlat * dx;
- <a name="l03613"></a>03613 XDrawLine(display,pix,gc,x,OffY,x,InYSize-1);
- <a name="l03614"></a>03614 }
- <a name="l03615"></a>03615 <span class="keywordflow">if</span> (GridLabel)
- <a name="l03616"></a>03616 {
- <a name="l03617"></a>03617 XDrawImageString(display,pix,gc,InXSize/2-FixFontWidth,InYSize-FixFont->descent,<span class="stringliteral">"EQ"</span>,2);
- <a name="l03618"></a>03618 XDrawImageString(display,pix,gc,OffX,InYSize-FixFont->descent,<span class="stringliteral">"N"</span>,1);
- <a name="l03619"></a>03619 XDrawImageString(display,pix,gc,InXSize-FixFontWidth,InYSize-FixFont->descent,<span class="stringliteral">"S"</span>,1);
- <a name="l03620"></a>03620 }
- <a name="l03621"></a>03621 XSetLineAttributes(display,gc,1,LineSolid,CapButt,JoinRound);
- <a name="l03622"></a>03622 }
- <a name="l03623"></a>03623
- <a name="l03624"></a><a class="code" href="pumax_8c.html#a1605a005c902c708301c522cb78ed5d9">03624</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a1605a005c902c708301c522cb78ed5d9">ShowGridCol</a>(<span class="keywordtype">void</span>)
- <a name="l03625"></a>03625 {
- <a name="l03626"></a>03626 <span class="keywordtype">int</span> jlev,jtim,x,y,len;
- <a name="l03627"></a>03627 <span class="keywordtype">float</span> dx,dy;
- <a name="l03628"></a>03628 <span class="keywordtype">char</span> Text[80];
- <a name="l03629"></a>03629
- <a name="l03630"></a>03630 <span class="comment">/* Grid for column time series */</span>
- <a name="l03631"></a>03631
- <a name="l03632"></a>03632 XSetForeground(display,gc,WhitePix);
- <a name="l03633"></a>03633 XSetBackground(display,gc,BlackPix);
- <a name="l03634"></a>03634 XSetLineAttributes(display,gc,1,LineOnOffDash,CapButt,JoinRound);
- <a name="l03635"></a>03635 dy = (InYSize - <a class="code" href="pumax_8c.html#a10481cd98c85988914fe8442f4ba3d83">OffY</a>) / (DimY - 1.0);
- <a name="l03636"></a>03636 <span class="keywordflow">for</span> (jlev = 1 ; jlev < DimY-1 ; ++jlev)
- <a name="l03637"></a>03637 {
- <a name="l03638"></a>03638 y = OffY + jlev * dy;
- <a name="l03639"></a>03639 XDrawLine(display,pix,gc,OffX,y,InXSize-1,y);
- <a name="l03640"></a>03640 }
- <a name="l03641"></a>03641 dx = (InXSize - <a class="code" href="pumax_8c.html#a67c8f2f939a4939efcfc51b1a2edff05">OffX</a>) / 4.0; <span class="comment">/* 4 slices */</span>
- <a name="l03642"></a>03642 <span class="keywordflow">for</span> (jtim = 1 ; jtim < 4 ; ++jtim)
- <a name="l03643"></a>03643 {
- <a name="l03644"></a>03644 x = OffX + jtim * dx;
- <a name="l03645"></a>03645 XDrawLine(display,pix,gc,x,OffY,x,InYSize-1);
- <a name="l03646"></a>03646 }
- <a name="l03647"></a>03647 <span class="keywordflow">if</span> (GridLabel)
- <a name="l03648"></a>03648 {
- <a name="l03649"></a>03649 XDrawImageString(display,pix,gc,InXSize/2-3*FixFontWidth/2,InYSize-FixFont->descent,<span class="stringliteral">"t-2"</span>,3);
- <a name="l03650"></a>03650 XDrawImageString(display,pix,gc,InXSize/4-3*FixFontWidth/2,InYSize-FixFont->descent,<span class="stringliteral">"t-3"</span>,3);
- <a name="l03651"></a>03651 XDrawImageString(display,pix,gc,3*InXSize/4-3*FixFontWidth/2,InYSize-FixFont->descent,<span class="stringliteral">"t-1"</span>,3);
- <a name="l03652"></a>03652 }
- <a name="l03653"></a>03653 XSetLineAttributes(display,gc,1,LineSolid,CapButt,JoinRound);
- <a name="l03654"></a>03654 }
- <a name="l03655"></a>03655
- <a name="l03656"></a><a class="code" href="pumax_8c.html#a48f79382d1404129c81412462243a5bd">03656</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a48f79382d1404129c81412462243a5bd">ShowGridLonsi</a>(<span class="keywordtype">void</span>)
- <a name="l03657"></a>03657 {
- <a name="l03658"></a>03658 <span class="keywordtype">int</span> jlev,jlat,x,y,len;
- <a name="l03659"></a>03659 <span class="keywordtype">float</span> dx,dy;
- <a name="l03660"></a>03660 <span class="keywordtype">char</span> Text[80];
- <a name="l03661"></a>03661
- <a name="l03662"></a>03662 <span class="comment">/* Grid for Longitude Sigma section */</span>
- <a name="l03663"></a>03663
- <a name="l03664"></a>03664 XSetForeground(display,gc,WhitePix);
- <a name="l03665"></a>03665 XSetBackground(display,gc,BlackPix);
- <a name="l03666"></a>03666 XSetLineAttributes(display,gc,1,LineOnOffDash,CapButt,JoinRound);
- <a name="l03667"></a>03667 dy = (InYSize - <a class="code" href="pumax_8c.html#a10481cd98c85988914fe8442f4ba3d83">OffY</a>) / (DimY - 1.0);
- <a name="l03668"></a>03668 <span class="keywordflow">for</span> (jlev = 1 ; jlev < DimY-1 ; ++jlev)
- <a name="l03669"></a>03669 {
- <a name="l03670"></a>03670 y = OffY + jlev * dy;
- <a name="l03671"></a>03671 XDrawLine(display,pix,gc,OffX,y,InXSize-1,y);
- <a name="l03672"></a>03672 }
- <a name="l03673"></a>03673 dx = (InXSize - <a class="code" href="pumax_8c.html#a67c8f2f939a4939efcfc51b1a2edff05">OffX</a>) / 6.0; <span class="comment">/* Every 60 degrees */</span>
- <a name="l03674"></a>03674 <span class="keywordflow">for</span> (jlat = 1 ; jlat < 6 ; ++jlat)
- <a name="l03675"></a>03675 {
- <a name="l03676"></a>03676 x = OffX + jlat * dx;
- <a name="l03677"></a>03677 XDrawLine(display,pix,gc,x,OffY,x,InYSize-1);
- <a name="l03678"></a>03678 }
- <a name="l03679"></a>03679 <span class="keywordflow">if</span> (GridLabel)
- <a name="l03680"></a>03680 {
- <a name="l03681"></a>03681 XDrawImageString(display,pix,gc,InXSize/2-3*FixFontWidth/2,InYSize-FixFont->descent,<span class="stringliteral">"180"</span>,3);
- <a name="l03682"></a>03682 XDrawImageString(display,pix,gc,OffX,InYSize-FixFont->descent,<span class="stringliteral">"0"</span>,1);
- <a name="l03683"></a>03683 XDrawImageString(display,pix,gc,InXSize-3*FixFontWidth,InYSize-FixFont->descent,<span class="stringliteral">"360"</span>,3);
- <a name="l03684"></a>03684 }
- <a name="l03685"></a>03685 XSetLineAttributes(display,gc,1,LineSolid,CapButt,JoinRound);
- <a name="l03686"></a>03686 }
- <a name="l03687"></a>03687
- <a name="l03688"></a><a class="code" href="pumax_8c.html#a3c6f5ed7ed2b12beb152524aef7c8670">03688</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a3c6f5ed7ed2b12beb152524aef7c8670">ShowGridCyl</a>(<span class="keywordtype">void</span>)
- <a name="l03689"></a>03689 {
- <a name="l03690"></a>03690 <span class="keywordtype">int</span> jlon,jlat,x,y;
- <a name="l03691"></a>03691 <span class="keywordtype">float</span> dx,dy;
- <a name="l03692"></a>03692
- <a name="l03693"></a>03693 <span class="comment">/* Grid for cylinder projection */</span>
- <a name="l03694"></a>03694
- <a name="l03695"></a>03695 XSetForeground(display,gc,WhitePix);
- <a name="l03696"></a>03696 XSetBackground(display,gc,BlackPix);
- <a name="l03697"></a>03697 XSetLineAttributes(display,gc,1,LineOnOffDash,CapButt,JoinRound);
- <a name="l03698"></a>03698 dy = (InYSize - <a class="code" href="pumax_8c.html#a10481cd98c85988914fe8442f4ba3d83">OffY</a>) / 6.0;
- <a name="l03699"></a>03699 <span class="keywordflow">for</span> (jlat = 1 ; jlat < 6 ; ++jlat)
- <a name="l03700"></a>03700 {
- <a name="l03701"></a>03701 y = OffY + jlat * dy;
- <a name="l03702"></a>03702 XDrawLine(display,pix,gc,OffX,y,InXSize-1,y);
- <a name="l03703"></a>03703 }
- <a name="l03704"></a>03704 dx = (InXSize - <a class="code" href="pumax_8c.html#a67c8f2f939a4939efcfc51b1a2edff05">OffX</a>) / 6.0; <span class="comment">/* Every 30 degrees */</span>
- <a name="l03705"></a>03705 <span class="keywordflow">for</span> (jlon = 1 ; jlon < 6 ; ++jlon)
- <a name="l03706"></a>03706 {
- <a name="l03707"></a>03707 x = OffX + jlon * dx;
- <a name="l03708"></a>03708 XDrawLine(display,pix,gc,x,OffY,x,InYSize-1);
- <a name="l03709"></a>03709 }
- <a name="l03710"></a>03710 <span class="keywordflow">if</span> (GridLabel)
- <a name="l03711"></a>03711 {
- <a name="l03712"></a>03712 XDrawImageString(display,pix,gc,OffX,OffY+(InYSize-OffY)/2+FixFontHeight/2-FixFont->descent,<span class="stringliteral">"EQ"</span>,2);
- <a name="l03713"></a>03713 XDrawImageString(display,pix,gc,OffX,OffY+FixFontHeight-FixFont->descent,<span class="stringliteral">"N"</span>,1);
- <a name="l03714"></a>03714 XDrawImageString(display,pix,gc,OffX,InYSize-FixFont->descent,<span class="stringliteral">"-180"</span>,4);
- <a name="l03715"></a>03715 XDrawImageString(display,pix,gc,InXSize-3*FixFontWidth,InYSize-FixFont->descent,<span class="stringliteral">"180"</span>,3);
- <a name="l03716"></a>03716 XDrawImageString(display,pix,gc,OffX+(InXSize-OffX)/2-3*FixFontWidth/2,InYSize-FixFont->descent,<span class="stringliteral">"0"</span>,1);
- <a name="l03717"></a>03717 }
- <a name="l03718"></a>03718 XSetLineAttributes(display,gc,1,LineSolid,CapButt,JoinRound);
- <a name="l03719"></a>03719 }
- <a name="l03720"></a>03720
- <a name="l03721"></a><a class="code" href="pumax_8c.html#a5a4a6887dea464a44006a936603a6a91">03721</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a5a4a6887dea464a44006a936603a6a91">ShowGridHov</a>(<span class="keywordtype">void</span>)
- <a name="l03722"></a>03722 {
- <a name="l03723"></a>03723 <span class="keywordtype">int</span> jlon,jlat,x,y,len;
- <a name="l03724"></a>03724 <span class="keywordtype">float</span> dx,dy;
- <a name="l03725"></a>03725 <span class="keywordtype">char</span> Text[80];
- <a name="l03726"></a>03726
- <a name="l03727"></a>03727 <span class="comment">/* Grid for Hovmoeller */</span>
- <a name="l03728"></a>03728
- <a name="l03729"></a>03729 XSetForeground(display,gc,WhitePix);
- <a name="l03730"></a>03730 XSetBackground(display,gc,BlackPix);
- <a name="l03731"></a>03731 XSetLineAttributes(display,gc,1,LineOnOffDash,CapButt,JoinRound);
- <a name="l03732"></a>03732 dx = (InXSize - <a class="code" href="pumax_8c.html#a67c8f2f939a4939efcfc51b1a2edff05">OffX</a>) / 6.0;
- <a name="l03733"></a>03733 <span class="keywordflow">for</span> (jlon = 1 ; jlon < 6 ; ++jlon)
- <a name="l03734"></a>03734 {
- <a name="l03735"></a>03735 x = OffX + jlon * dx;
- <a name="l03736"></a>03736 XDrawLine(display,pix,gc,x,OffY,x,InYSize-1);
- <a name="l03737"></a>03737 }
- <a name="l03738"></a>03738 dy = (InYSize - <a class="code" href="pumax_8c.html#a10481cd98c85988914fe8442f4ba3d83">OffY</a>) / 5.0; <span class="comment">/* Every 5 days */</span>
- <a name="l03739"></a>03739 <span class="keywordflow">for</span> (jlat = 1 ; jlat < 5 ; ++jlat)
- <a name="l03740"></a>03740 {
- <a name="l03741"></a>03741 y = OffY + jlat * dy;
- <a name="l03742"></a>03742 XDrawLine(display,pix,gc,OffX,y,InXSize-1,y);
- <a name="l03743"></a>03743 }
- <a name="l03744"></a>03744 <span class="keywordflow">if</span> (GridLabel)
- <a name="l03745"></a>03745 {
- <a name="l03746"></a>03746 XDrawImageString(display,pix,gc,OffX,InYSize-FixFont->descent,<span class="stringliteral">"0"</span>,1);
- <a name="l03747"></a>03747 XDrawImageString(display,pix,gc,InXSize-3*FixFontWidth,InYSize-FixFont->descent,<span class="stringliteral">"360"</span>,3);
- <a name="l03748"></a>03748 XDrawImageString(display,pix,gc,OffX+(InXSize-OffX)/2-3*FixFontWidth/2,InYSize-FixFont->descent,<span class="stringliteral">"180"</span>,3);
- <a name="l03749"></a>03749 XDrawImageString(display,pix,gc,OffX,OffY+FixFontHeight-FixFont->descent,<span class="stringliteral">"t0"</span>,2);
- <a name="l03750"></a>03750 XDrawImageString(display,pix,gc,OffX,OffY+2*InYSize/5+FixFontHeight/2-FixFont->descent,<span class="stringliteral">"t-2"</span>,3);
- <a name="l03751"></a>03751 XDrawImageString(display,pix,gc,OffX,OffY+4*InYSize/5+FixFontHeight/2-FixFont->descent,<span class="stringliteral">"t-4"</span>,3);
- <a name="l03752"></a>03752 }
- <a name="l03753"></a>03753 XSetLineAttributes(display,gc,1,LineSolid,CapButt,JoinRound);
- <a name="l03754"></a>03754 }
- <a name="l03755"></a>03755
- <a name="l03756"></a><a class="code" href="pumax_8c.html#ae9322503c9ee71d24ed929c4433b81f0">03756</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#ae9322503c9ee71d24ed929c4433b81f0">ShowGridHovT</a>(<span class="keywordtype">void</span>)
- <a name="l03757"></a>03757 {
- <a name="l03758"></a>03758 <span class="keywordtype">int</span> jlon,jlat,x,y,len;
- <a name="l03759"></a>03759 <span class="keywordtype">float</span> dx,dy;
- <a name="l03760"></a>03760 <span class="keywordtype">char</span> Text[80];
- <a name="l03761"></a>03761
- <a name="l03762"></a>03762 <span class="comment">/* Grid for Hovmoeller */</span>
- <a name="l03763"></a>03763
- <a name="l03764"></a>03764 XSetForeground(display,gc,WhitePix);
- <a name="l03765"></a>03765 XSetBackground(display,gc,BlackPix);
- <a name="l03766"></a>03766 XSetLineAttributes(display,gc,1,LineOnOffDash,CapButt,JoinRound);
- <a name="l03767"></a>03767 dy = (InYSize - <a class="code" href="pumax_8c.html#a10481cd98c85988914fe8442f4ba3d83">OffY</a>) / 6.0;
- <a name="l03768"></a>03768 <span class="keywordflow">for</span> (jlat = 1 ; jlat < 6 ; ++jlat)
- <a name="l03769"></a>03769 {
- <a name="l03770"></a>03770 y = OffY + jlat * dy;
- <a name="l03771"></a>03771 XDrawLine(display,pix,gc,OffX,y,InXSize-1,y);
- <a name="l03772"></a>03772 }
- <a name="l03773"></a>03773 dx = (InXSize - <a class="code" href="pumax_8c.html#a67c8f2f939a4939efcfc51b1a2edff05">OffX</a>) / 5.0; <span class="comment">/* Every 5 days */</span>
- <a name="l03774"></a>03774 <span class="keywordflow">for</span> (jlat = 1 ; jlat < 5 ; ++jlat)
- <a name="l03775"></a>03775 {
- <a name="l03776"></a>03776 x = OffX + jlat * dx;
- <a name="l03777"></a>03777 XDrawLine(display,pix,gc,x,OffY,x,InYSize-1);
- <a name="l03778"></a>03778 }
- <a name="l03779"></a>03779 <span class="keywordflow">if</span> (GridLabel)
- <a name="l03780"></a>03780 {
- <a name="l03781"></a>03781 XDrawImageString(display,pix,gc,OffX,OffY+FixFontHeight-FixFont->descent,<span class="stringliteral">"0"</span>,1);
- <a name="l03782"></a>03782 XDrawImageString(display,pix,gc,OffX,OffY+(InYSize-OffY)/2+FixFontHeight/2-FixFont->descent,<span class="stringliteral">"180"</span>,3);
- <a name="l03783"></a>03783 XDrawImageString(display,pix,gc,OffX,InYSize-FixFont->descent,<span class="stringliteral">"360"</span>,3);
- <a name="l03784"></a>03784 XDrawImageString(display,pix,gc,InXSize-2*FixFontWidth,InYSize-FixFont->descent,<span class="stringliteral">"t0"</span>,2);
- <a name="l03785"></a>03785 XDrawImageString(display,pix,gc,3*InXSize/5-3*FixFontWidth/2,InYSize-FixFont->descent,<span class="stringliteral">"t-2"</span>,3);
- <a name="l03786"></a>03786 XDrawImageString(display,pix,gc, InXSize/5-3*FixFontWidth/2,InYSize-FixFont->descent,<span class="stringliteral">"t-4"</span>,3);
- <a name="l03787"></a>03787 }
- <a name="l03788"></a>03788 XSetLineAttributes(display,gc,1,LineSolid,CapButt,JoinRound);
- <a name="l03789"></a>03789 }
- <a name="l03790"></a>03790
- <a name="l03791"></a><a class="code" href="pumax_8c.html#a8736525de26ffa57c6d3f302e0464e88">03791</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a8736525de26ffa57c6d3f302e0464e88">ShowGridPolar</a>(<span class="keywordtype">void</span>)
- <a name="l03792"></a>03792 {
- <a name="l03793"></a>03793 <span class="keywordtype">int</span> dx,dy,x,y,xh,yh,ox,oy;
- <a name="l03794"></a>03794 XPoint pxy[3];
- <a name="l03795"></a>03795
- <a name="l03796"></a>03796 <span class="comment">/* Grid for polar projection */</span>
- <a name="l03797"></a>03797
- <a name="l03798"></a>03798 dx = (InXSize - <a class="code" href="pumax_8c.html#a67c8f2f939a4939efcfc51b1a2edff05">OffX</a>) / 2;
- <a name="l03799"></a>03799 dy = (InYSize - <a class="code" href="pumax_8c.html#a10481cd98c85988914fe8442f4ba3d83">OffY</a>);
- <a name="l03800"></a>03800 xh = dx / 2;
- <a name="l03801"></a>03801 yh = dy / 2;
- <a name="l03802"></a>03802 ox = dx / 3.414;
- <a name="l03803"></a>03803 oy = dy / 3.414;
- <a name="l03804"></a>03804
- <a name="l03805"></a>03805 <span class="keywordflow">if</span> (Grid)
- <a name="l03806"></a>03806 {
- <a name="l03807"></a>03807 XSetForeground(display,gc,WhitePix);
- <a name="l03808"></a>03808 XSetBackground(display,gc,BlackPix);
- <a name="l03809"></a>03809 XSetLineAttributes(display,gc,1,LineOnOffDash,CapButt,JoinRound);
- <a name="l03810"></a>03810
- <a name="l03811"></a>03811 <span class="comment">/* Northern Hemisphere */</span>
- <a name="l03812"></a>03812
- <a name="l03813"></a>03813 XDrawArc(display,pix,gc,OffX+dx/6,OffY+dy/6,2*dx/3,2*dy/3,0,360*64);
- <a name="l03814"></a>03814 XDrawArc(display,pix,gc,OffX+dx/3,OffY+dy/3,dx/3,dy/3,0,360*64);
- <a name="l03815"></a>03815
- <a name="l03816"></a>03816 XDrawLine(display,pix,gc,OffX,yh,InXSize,yh);
- <a name="l03817"></a>03817 XDrawLine(display,pix,gc,OffX+xh,OffY,OffX+xh,InYSize);
- <a name="l03818"></a>03818
- <a name="l03819"></a>03819 <span class="comment">/* Southern Hemisphere */</span>
- <a name="l03820"></a>03820
- <a name="l03821"></a>03821 XDrawArc(display,pix,gc,OffX+7*dx/6,OffY+dy/6,2*dx/3,2*dy/3,0,360*64);
- <a name="l03822"></a>03822 XDrawArc(display,pix,gc,OffX+4*dx/3,OffY+dy/3,dx/3,dy/3,0,360*64);
- <a name="l03823"></a>03823
- <a name="l03824"></a>03824 x = OffX + dx + xh;
- <a name="l03825"></a>03825 XDrawLine(display,pix,gc,x,OffY,x,InYSize);
- <a name="l03826"></a>03826
- <a name="l03827"></a>03827 <span class="keywordflow">if</span> (GridLabel)
- <a name="l03828"></a>03828 {
- <a name="l03829"></a>03829 x = OffX + xh - FixFontWidth/2;
- <a name="l03830"></a>03830 y = OffY + yh + FixFontHeight/2 - FixFont->descent;
- <a name="l03831"></a>03831 XDrawImageString(display,pix,gc,x,y,<span class="stringliteral">"N"</span>,1);
- <a name="l03832"></a>03832 XDrawImageString(display,pix,gc,x+dx,y,<span class="stringliteral">"S"</span>,1);
- <a name="l03833"></a>03833 }
- <a name="l03834"></a>03834 XSetLineAttributes(display,gc,1,LineSolid,CapButt,JoinRound);
- <a name="l03835"></a>03835 }
- <a name="l03836"></a>03836
- <a name="l03837"></a>03837 <span class="comment">/* Octagon mask */</span>
- <a name="l03838"></a>03838
- <a name="l03839"></a>03839 XSetForeground(display,gc,BlackPix);
- <a name="l03840"></a>03840 pxy[0].x = pxy[1].x = <a class="code" href="pumax_8c.html#a67c8f2f939a4939efcfc51b1a2edff05">OffX</a>;
- <a name="l03841"></a>03841 pxy[0].y = pxy[2].y = <a class="code" href="pumax_8c.html#a10481cd98c85988914fe8442f4ba3d83">OffY</a>;
- <a name="l03842"></a>03842 pxy[1].y = OffY + oy;
- <a name="l03843"></a>03843 pxy[2].x = OffX + ox;
- <a name="l03844"></a>03844 XFillPolygon(display,pix,gc,pxy,3,Convex,CoordModeOrigin);
- <a name="l03845"></a>03845 pxy[0].x = OffX + dx - ox;
- <a name="l03846"></a>03846 pxy[1].x = OffX + dx;
- <a name="l03847"></a>03847 pxy[2].x = OffX + dx + ox;
- <a name="l03848"></a>03848 XFillPolygon(display,pix,gc,pxy,3,Convex,CoordModeOrigin);
- <a name="l03849"></a>03849 pxy[0].x = InXSize - ox;
- <a name="l03850"></a>03850 pxy[1].x = <a class="code" href="pumax_8c.html#a77751be4ce780fbc796f89264e0834ed">InXSize</a>;
- <a name="l03851"></a>03851 pxy[2].x = <a class="code" href="pumax_8c.html#a77751be4ce780fbc796f89264e0834ed">InXSize</a>;
- <a name="l03852"></a>03852 XFillPolygon(display,pix,gc,pxy,3,Convex,CoordModeOrigin);
- <a name="l03853"></a>03853
- <a name="l03854"></a>03854 pxy[0].x = pxy[1].x = <a class="code" href="pumax_8c.html#a67c8f2f939a4939efcfc51b1a2edff05">OffX</a>;
- <a name="l03855"></a>03855 pxy[0].y = pxy[2].y = <a class="code" href="pumax_8c.html#a2e0311fae05aa716cc8cd6669af5bf3a">InYSize</a>;
- <a name="l03856"></a>03856 pxy[1].y = InYSize - oy;
- <a name="l03857"></a>03857 pxy[2].x = OffX + ox;
- <a name="l03858"></a>03858 XFillPolygon(display,pix,gc,pxy,3,Convex,CoordModeOrigin);
- <a name="l03859"></a>03859 pxy[0].x = OffX + dx - ox;
- <a name="l03860"></a>03860 pxy[1].x = OffX + dx;
- <a name="l03861"></a>03861 pxy[2].x = OffX + dx + ox;
- <a name="l03862"></a>03862 XFillPolygon(display,pix,gc,pxy,3,Convex,CoordModeOrigin);
- <a name="l03863"></a>03863 pxy[0].x = InXSize - ox;
- <a name="l03864"></a>03864 pxy[1].x = <a class="code" href="pumax_8c.html#a77751be4ce780fbc796f89264e0834ed">InXSize</a>;
- <a name="l03865"></a>03865 pxy[2].x = <a class="code" href="pumax_8c.html#a77751be4ce780fbc796f89264e0834ed">InXSize</a>;
- <a name="l03866"></a>03866 XFillPolygon(display,pix,gc,pxy,3,Convex,CoordModeOrigin);
- <a name="l03867"></a>03867 }
- <a name="l03868"></a>03868
- <a name="l03869"></a>03869
- <a name="l03870"></a><a class="code" href="pumax_8c.html#a2bf6b3944a8626182a54245cb8dcea36">03870</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a2bf6b3944a8626182a54245cb8dcea36">AutoPalette</a>(<span class="keywordtype">int</span> w, <span class="keyword">struct</span> <a class="code" href="struct_color_strip.html">ColorStrip</a> Strip[], <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> f[], <span class="keywordtype">int</span> Dim)
- <a name="l03871"></a>03871 {
- <a name="l03872"></a>03872 <span class="keywordtype">int</span> i,nbands;
- <a name="l03873"></a>03873 <span class="keywordtype">double</span> fmin, fmax, frange, delta, fdelta, xdelta, Lo;
- <a name="l03874"></a>03874
- <a name="l03875"></a>03875 fmin = fmax = f[0];
- <a name="l03876"></a>03876 <span class="keywordflow">for</span> (i=0; i < Dim ; ++i)
- <a name="l03877"></a>03877 {
- <a name="l03878"></a>03878 <span class="keywordflow">if</span> (fmin > f[i]) fmin = f[i];
- <a name="l03879"></a>03879 <span class="keywordflow">if</span> (fmax < f[i]) fmax = f[i];
- <a name="l03880"></a>03880 }
- <a name="l03881"></a>03881 frange = fmax - fmin;
- <a name="l03882"></a>03882 Lo = 0.0;
- <a name="l03883"></a>03883 xdelta = 0.1;
- <a name="l03884"></a>03884 <span class="keywordflow">if</span> (frange > 1.0e-10)
- <a name="l03885"></a>03885 {
- <a name="l03886"></a>03886 delta = frange / <a class="code" href="pumax_8c.html#a7f2aa7d59c57b8054e230e2f72564671">AUTOCOLORS</a>;
- <a name="l03887"></a>03887 <span class="keywordflow">if</span> (delta > AutoDelta[w] / 1.4 && delta < 1.4 * AutoDelta[w])
- <a name="l03888"></a>03888 {
- <a name="l03889"></a>03889 xdelta = AutoXdelt[w];
- <a name="l03890"></a>03890 delta = AutoDelta[w];
- <a name="l03891"></a>03891 Lo = AutoLo[w];
- <a name="l03892"></a>03892 }
- <a name="l03893"></a>03893 <span class="keywordflow">else</span>
- <a name="l03894"></a>03894 {
- <a name="l03895"></a>03895 fdelta = pow(10.0,rint(log10(delta)));
- <a name="l03896"></a>03896 xdelta = fdelta;
- <a name="l03897"></a>03897 nbands = frange / xdelta;
- <a name="l03898"></a>03898 <span class="keywordflow">if</span> (nbands < <a class="code" href="pumax_8c.html#a7f2aa7d59c57b8054e230e2f72564671">AUTOCOLORS</a> / 2) xdelta = 0.5 * fdelta;
- <a name="l03899"></a>03899 <span class="keywordflow">if</span> (nbands > <a class="code" href="pumax_8c.html#a7f2aa7d59c57b8054e230e2f72564671">AUTOCOLORS</a> ) xdelta = 2.0 * fdelta;
- <a name="l03900"></a>03900 nbands = frange / xdelta;
- <a name="l03901"></a>03901 <span class="keywordflow">if</span> (nbands > <a class="code" href="pumax_8c.html#a7f2aa7d59c57b8054e230e2f72564671">AUTOCOLORS</a> ) xdelta = 5.0 * fdelta;
- <a name="l03902"></a>03902 Lo = xdelta * floor(fmin / xdelta);
- <a name="l03903"></a>03903 AutoDelta[w] = delta;
- <a name="l03904"></a>03904 AutoXdelt[w] = xdelta;
- <a name="l03905"></a>03905 AutoLo[w] = Lo;
- <a name="l03906"></a>03906 <span class="comment">/*</span>
- <a name="l03907"></a>03907 <span class="comment"> if (Debug)</span>
- <a name="l03908"></a>03908 <span class="comment"> {</span>
- <a name="l03909"></a>03909 <span class="comment"> printf("Autopalette\n");</span>
- <a name="l03910"></a>03910 <span class="comment"> printf(" Range: %14.6e\n",frange);</span>
- <a name="l03911"></a>03911 <span class="comment"> printf(" delta: %14.6e\n",delta);</span>
- <a name="l03912"></a>03912 <span class="comment"> printf("fdelta: %14.6e\n",fdelta);</span>
- <a name="l03913"></a>03913 <span class="comment"> printf("xdelta: %14.6e\n",xdelta);</span>
- <a name="l03914"></a>03914 <span class="comment"> }</span>
- <a name="l03915"></a>03915 <span class="comment">*/</span>
- <a name="l03916"></a>03916 }
- <a name="l03917"></a>03917 }
- <a name="l03918"></a>03918 Strip[0].<a class="code" href="struct_color_strip.html#a4f6280212828381ae297b3f9565e7ce8">Lo</a> = Lo;
- <a name="l03919"></a>03919 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#a7f2aa7d59c57b8054e230e2f72564671">AUTOCOLORS</a> ; ++i)
- <a name="l03920"></a>03920 {
- <a name="l03921"></a>03921 Strip[i+1].<a class="code" href="struct_color_strip.html#a4f6280212828381ae297b3f9565e7ce8">Lo</a> = Strip[i].<a class="code" href="struct_color_strip.html#a6deff3a5a5614df503a3af930233730b">Hi</a> = Strip[i].<a class="code" href="struct_color_strip.html#a4f6280212828381ae297b3f9565e7ce8">Lo</a> + xdelta;
- <a name="l03922"></a>03922 <span class="comment">// if (Debug) printf("Auto[%2d] = %10.4f - %10.4f\n",i,Strip[i].Lo,Strip[i].Hi);</span>
- <a name="l03923"></a>03923 }
- <a name="l03924"></a>03924 <span class="keywordflow">return</span>;
- <a name="l03925"></a>03925 }
- <a name="l03926"></a>03926
- <a name="l03927"></a>03927
- <a name="l03928"></a>03928 <span class="comment">// Interface routine to model code in FORTRAN</span>
- <a name="l03929"></a>03929
- <a name="l03930"></a><a class="code" href="pumax_8c.html#a583096811c0b0b458ad353d0e09e75a0">03930</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a583096811c0b0b458ad353d0e09e75a0">guiput_</a>(<span class="keywordtype">char</span> *aname, <span class="keywordtype">float</span> *array, <span class="keywordtype">int</span> *dimx, <span class="keywordtype">int</span> *dimy, <span class="keywordtype">int</span> *dimz)
- <a name="l03931"></a>03931 {
- <a name="l03932"></a>03932 <span class="keywordtype">int</span> i,nb,nf;
- <a name="l03933"></a>03933
- <a name="l03934"></a>03934 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>) printf(<span class="stringliteral">"guiput(%s,%12.4e,%d,%d,%d)\n"</span>,
- <a name="l03935"></a>03935 aname,*array,*dimx,*dimy,*dimz);
- <a name="l03936"></a>03936 nf = (*dimx) * (*dimz);
- <a name="l03937"></a>03937 <span class="keywordflow">if</span> (*dimy > 0) nf *= (*dimy);
- <a name="l03938"></a>03938 <span class="keywordflow">else</span> nf *= 2;
- <a name="l03939"></a>03939 nb = nf * <span class="keyword">sizeof</span>(float);
- <a name="l03940"></a>03940 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#a66a0f3add0dee72c7f3811b88249a9b6">NumArrays</a> ; ++i)
- <a name="l03941"></a>03941 <span class="keywordflow">if</span> (!strcmp(aname,<a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].Name)) <span class="keywordflow">break</span>;
- <a name="l03942"></a>03942 <span class="keywordflow">if</span> (i == NumArrays)
- <a name="l03943"></a>03943 {
- <a name="l03944"></a>03944 ++<a class="code" href="pumax_8c.html#a66a0f3add0dee72c7f3811b88249a9b6">NumArrays</a>;
- <a name="l03945"></a>03945 strcpy(<a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].Name,aname);
- <a name="l03946"></a>03946 <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].<a class="code" href="struct_array_struct.html#a38c55a484b3d01e2ffa11f14de2adfd9">Data</a> = <a class="code" href="pumax_8c.html#a2ec2314ef785dc1cddc562590cd034ad">FloatAlloc</a>(nf,aname);
- <a name="l03947"></a>03947 <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].<a class="code" href="struct_array_struct.html#a51fc8e81440a7098077d179fca8d63b8">DimX</a> = *dimx;
- <a name="l03948"></a>03948 <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].<a class="code" href="struct_array_struct.html#a73fc2a83ee5c78d73b0f4389a0771afb">DimY</a> = *dimy;
- <a name="l03949"></a>03949 <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].<a class="code" href="struct_array_struct.html#a53f6572c6d936b07f27d8d6fb9acb915">DimZ</a> = *dimz;
- <a name="l03950"></a>03950 <span class="keywordflow">if</span> (strcmp(aname,<span class="stringliteral">"GU"</span>) == 0) Uindex = i;
- <a name="l03951"></a>03951 <span class="keywordflow">if</span> (strcmp(aname,<span class="stringliteral">"GV"</span>) == 0) Vindex = i;
- <a name="l03952"></a>03952 }
- <a name="l03953"></a>03953 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].Data) memcpy(<a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].Data,array,nb);
- <a name="l03954"></a>03954 <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].<a class="code" href="struct_array_struct.html#a00b2e20e7e3b5c5f3cf3e9e6cee16ca3">Flag</a> = 1; <span class="comment">// Data have changed</span>
- <a name="l03955"></a>03955 }
- <a name="l03956"></a>03956
- <a name="l03957"></a>03957
- <a name="l03958"></a><a class="code" href="pumax_8c.html#ac3d880b4fabf53d2752d77f1457ba346">03958</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#ac3d880b4fabf53d2752d77f1457ba346">guisend_</a>(<span class="keywordtype">char</span> *aname, <span class="keywordtype">float</span> *array, <span class="keywordtype">int</span> *dimx, <span class="keywordtype">int</span> *dimy, <span class="keywordtype">int</span> *dimz)
- <a name="l03959"></a>03959 {
- <a name="l03960"></a>03960 <span class="keywordtype">int</span> i,nb,nf;
- <a name="l03961"></a>03961
- <a name="l03962"></a>03962 nf = (*dimx) * (*dimz);
- <a name="l03963"></a>03963 <span class="keywordflow">if</span> (*dimy > 0) nf *= (*dimy);
- <a name="l03964"></a>03964 <span class="keywordflow">else</span> nf *= 2;
- <a name="l03965"></a>03965 nb = nf * <span class="keyword">sizeof</span>(float);
- <a name="l03966"></a>03966 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#a66a0f3add0dee72c7f3811b88249a9b6">NumArrays</a> ; ++i)
- <a name="l03967"></a>03967 <span class="keywordflow">if</span> (!strcmp(aname,<a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].Name)) <span class="keywordflow">break</span>;
- <a name="l03968"></a>03968 <span class="keywordflow">if</span> (i == NumArrays)
- <a name="l03969"></a>03969 {
- <a name="l03970"></a>03970 ++<a class="code" href="pumax_8c.html#a66a0f3add0dee72c7f3811b88249a9b6">NumArrays</a>;
- <a name="l03971"></a>03971 strcpy(<a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].Name,aname);
- <a name="l03972"></a>03972 <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].<a class="code" href="struct_array_struct.html#a51fc8e81440a7098077d179fca8d63b8">DimX</a> = *dimx;
- <a name="l03973"></a>03973 <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].<a class="code" href="struct_array_struct.html#a73fc2a83ee5c78d73b0f4389a0771afb">DimY</a> = *dimy;
- <a name="l03974"></a>03974 <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].<a class="code" href="struct_array_struct.html#a53f6572c6d936b07f27d8d6fb9acb915">DimZ</a> = *dimz;
- <a name="l03975"></a>03975 }
- <a name="l03976"></a>03976 <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].<a class="code" href="struct_array_struct.html#a38c55a484b3d01e2ffa11f14de2adfd9">Data</a> = array;
- <a name="l03977"></a>03977 <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[i].<a class="code" href="struct_array_struct.html#a00b2e20e7e3b5c5f3cf3e9e6cee16ca3">Flag</a> = 1; <span class="comment">// Data have changed</span>
- <a name="l03978"></a>03978 }
- <a name="l03979"></a>03979
- <a name="l03980"></a>03980
- <a name="l03981"></a>03981 <span class="comment">// Do the plot</span>
- <a name="l03982"></a>03982
- <a name="l03983"></a><a class="code" href="pumax_8c.html#a6d3107848ccc42cc33820aad454e7fcb">03983</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a6d3107848ccc42cc33820aad454e7fcb">iso</a>(<span class="keywordtype">int</span> w,<span class="keywordtype">int</span> PicType,<a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> *field,<span class="keywordtype">int</span> dimx,<span class="keywordtype">int</span> dimy,<span class="keywordtype">int</span> dimz,<span class="keywordtype">int</span> pal)
- <a name="l03984"></a>03984 {
- <a name="l03985"></a>03985 <span class="keywordtype">char</span> Text[128];
- <a name="l03986"></a>03986
- <a name="l03987"></a>03987 <span class="keywordtype">int</span> i,j,k,len,lens,xp,yp,status,x;
- <a name="l03988"></a>03988 <span class="keywordtype">int</span> y,dx,r,width,height;
- <a name="l03989"></a>03989 <a class="code" href="pumax_8c.html#af03d9314df919290b49b331146eab250">INTXU</a> border,depth;
- <a name="l03990"></a>03990 <a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a> f,o,ra,rb;
- <a name="l03991"></a>03991 <span class="keywordtype">int</span> CapLines;
- <a name="l03992"></a>03992 <span class="keywordtype">float</span> *tspt;
- <a name="l03993"></a>03993 XEvent WinEvent;
- <a name="l03994"></a>03994 Window Rootwin,Child;
- <a name="l03995"></a>03995
- <a name="l03996"></a>03996 <span class="comment">// if (Debug) printf("iso(%d,%s,%12.4e,%d,%d,%d,%d)\n",w,IsoNames[PicType],*field,dimx,dimy,dimz,pal);</span>
- <a name="l03997"></a>03997 <span class="keywordflow">if</span> (Win[w] == 0) <span class="keywordflow">return</span>;
- <a name="l03998"></a>03998 win = w;
- <a name="l03999"></a>03999 <span class="keywordflow">if</span> (SkipFreq > 1 && (nstep % SkipFreq) != 0 &&
- <a name="l04000"></a>04000 (PicType == <a class="code" href="pumax_8c.html#afc9e7bd37f3dc38ff12cdf5edb85a6d2">ISOCS</a> || PicType == <a class="code" href="pumax_8c.html#a2f1d89ef346ef5189b556085f4553c4c">ISOHOR</a> || PicType == <a class="code" href="pumax_8c.html#a3e3bcad4c273544328bcdcaef35c3852">MAPHOR</a> || PicType == <a class="code" href="pumax_8c.html#a35e0c3caf44835d5c02d3af3b975e21b">ISOCOL</a>)) <span class="keywordflow">return</span>;
- <a name="l04001"></a>04001 XGetGeometry(display,Win[w],&Rootwin,&xp,&yp,&WinXSize,&WinYSize,
- <a name="l04002"></a>04002 &border,&depth);
- <a name="l04003"></a>04003 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].<a class="code" href="struct_win_att_struct.html#a6e7f8041c23d41b7d2835a2b855d35f0">w</a> = <a class="code" href="pumax_8c.html#a90fa18336f52663513916236b6c3f633">WinXSize</a>;
- <a name="l04004"></a>04004 <a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].<a class="code" href="struct_win_att_struct.html#aa9c1c94dee4ebbe95eb392f738835055">h</a> = <a class="code" href="pumax_8c.html#a48ba2c20a7bf82da8f16252eff21155f">WinYSize</a>;
- <a name="l04005"></a>04005 InXSize = WinXSize - <a class="code" href="pumax_8c.html#a67c8f2f939a4939efcfc51b1a2edff05">OffX</a>;
- <a name="l04006"></a>04006 InYSize = WinYSize - <a class="code" href="pumax_8c.html#a10481cd98c85988914fe8442f4ba3d83">OffY</a>;
- <a name="l04007"></a>04007 <span class="keywordflow">if</span> (PicType != <a class="code" href="pumax_8c.html#a4c30d0a50533694deda0fcf3551b6935">ISOTRA</a> && PicType != <a class="code" href="pumax_8c.html#a1572b520f538d357372e96d0185275e5">MAPTRA</a>) InYSize -= 20; <span class="comment">// Room for colorbar</span>
- <a name="l04008"></a>04008 DimX = dimx;
- <a name="l04009"></a>04009 DimY = dimy;
- <a name="l04010"></a>04010 DimZ = dimz;
- <a name="l04011"></a>04011 <span class="keywordflow">if</span> (DimY < 0) DimY = -<a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a>; <span class="comment">// Get NTP1 for ISOSH</span>
- <a name="l04012"></a>04012 DimXY = DimX * <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a>;
- <a name="l04013"></a>04013 VGAX = (InXSize-1.0) / (DimX-1.0);
- <a name="l04014"></a>04014 <span class="keywordflow">if</span> (DimY > 1) VGAY = (InYSize-1.0) / (DimY-1.0);
- <a name="l04015"></a>04015 <span class="keywordflow">else</span> VGAY = 1.0;
- <a name="l04016"></a>04016 Field = field;
- <a name="l04017"></a>04017
- <a name="l04018"></a>04018 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#a4c30d0a50533694deda0fcf3551b6935">ISOTRA</a> || PicType == <a class="code" href="pumax_8c.html#a1572b520f538d357372e96d0185275e5">MAPTRA</a>)
- <a name="l04019"></a>04019 {
- <a name="l04020"></a>04020 DimX = dimx; <span class="comment">// NLON</span>
- <a name="l04021"></a>04021 DimY = dimy; <span class="comment">// NLAT</span>
- <a name="l04022"></a>04022 DimZ = dimz; <span class="comment">// NLEV</span>
- <a name="l04023"></a>04023 DimXY = DimX * <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a>;
- <a name="l04024"></a>04024 VGAX = (InXSize-1.0) / (DimX-1.0);
- <a name="l04025"></a>04025 VGAY = (InYSize-1.0) / (DimY-1.0);
- <a name="l04026"></a>04026 <span class="keywordflow">if</span> (MaxZ[w] < DimZ)
- <a name="l04027"></a>04027 {
- <a name="l04028"></a>04028 MaxZ[w] = <a class="code" href="pumax_8c.html#a510628f6a0e0c51b4ca6492e4d8595e0">DimZ</a>;
- <a name="l04029"></a>04029 Indez[w] = DimZ / 4;
- <a name="l04030"></a>04030 <a class="code" href="pumax_8c.html#ac78f1f279638bfd177687a680c4c21ce">SwitchIndez</a>(w,0); <span class="comment">// Initialize title</span>
- <a name="l04031"></a>04031 }
- <a name="l04032"></a>04032 }
- <a name="l04033"></a>04033
- <a name="l04034"></a>04034 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#a2f1d89ef346ef5189b556085f4553c4c">ISOHOR</a> || PicType == <a class="code" href="pumax_8c.html#a3e3bcad4c273544328bcdcaef35c3852">MAPHOR</a>)
- <a name="l04035"></a>04035 {
- <a name="l04036"></a>04036 DimX = dimx; <span class="comment">// NLON</span>
- <a name="l04037"></a>04037 DimY = dimy; <span class="comment">// NLAT</span>
- <a name="l04038"></a>04038 DimZ = dimz; <span class="comment">// NLEV</span>
- <a name="l04039"></a>04039 DimXY = DimX * <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a>;
- <a name="l04040"></a>04040 VGAX = (InXSize-1.0) / (DimX-1.0);
- <a name="l04041"></a>04041 VGAY = (InYSize-1.0) / (DimY-1.0);
- <a name="l04042"></a>04042 <span class="keywordflow">if</span> (MaxZ[w] < DimZ)
- <a name="l04043"></a>04043 {
- <a name="l04044"></a>04044 MaxZ[w] = <a class="code" href="pumax_8c.html#a510628f6a0e0c51b4ca6492e4d8595e0">DimZ</a>;
- <a name="l04045"></a>04045 Indez[w] = DimZ / 4;
- <a name="l04046"></a>04046 <a class="code" href="pumax_8c.html#ac78f1f279638bfd177687a680c4c21ce">SwitchIndez</a>(w,0); <span class="comment">// Initialize title</span>
- <a name="l04047"></a>04047 TSdata[w] = <a class="code" href="pumax_8c.html#a2ec2314ef785dc1cddc562590cd034ad">FloatAlloc</a>(DimXY,<span class="stringliteral">"ISOLON"</span>);
- <a name="l04048"></a>04048 }
- <a name="l04049"></a>04049 <span class="keywordflow">if</span> (MapPro[w] == <a class="code" href="pumax_8c.html#ad431eb8cf00095009fcd1924efffa213">POLAR</a>)
- <a name="l04050"></a>04050 {
- <a name="l04051"></a>04051 Field = TSdata[w];
- <a name="l04052"></a>04052 <a class="code" href="pumax_8c.html#a47d2c6cfb8dd4bebb935c05cb54c9148">lp2ps</a>(field + Indez[w] * DimXY,Field);
- <a name="l04053"></a>04053 }
- <a name="l04054"></a>04054 <span class="comment">/*</span>
- <a name="l04055"></a>04055 <span class="comment"> else if (MapPro[w] == AZIMUTHAL)</span>
- <a name="l04056"></a>04056 <span class="comment"> {</span>
- <a name="l04057"></a>04057 <span class="comment"> Field = TSdata[w];</span>
- <a name="l04058"></a>04058 <span class="comment"> lp2az(field + Indez[w] * DimXY,Field,MapLR[w].l);</span>
- <a name="l04059"></a>04059 <span class="comment"> }</span>
- <a name="l04060"></a>04060 <span class="comment">*/</span>
- <a name="l04061"></a>04061 <span class="keywordflow">else</span> Field = field + Indez[w] * <a class="code" href="pumax_8c.html#a132288db6a5e56bd89aedf01da72b83f">DimXY</a>;
- <a name="l04062"></a>04062 }
- <a name="l04063"></a>04063
- <a name="l04064"></a>04064 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#ad3652a10b82037800a3efb555fb7833c">ISOLON</a>)
- <a name="l04065"></a>04065 {
- <a name="l04066"></a>04066 DimX = dimx; <span class="comment">// NLON</span>
- <a name="l04067"></a>04067 DimY = dimz; <span class="comment">// NLEV</span>
- <a name="l04068"></a>04068 DimZ = dimy; <span class="comment">// NLAT</span>
- <a name="l04069"></a>04069 DimXY = DimX * <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a>;
- <a name="l04070"></a>04070 VGAX = (InXSize-1.0) / (DimX-1.0);
- <a name="l04071"></a>04071 VGAY = (InYSize-1.0) / (DimY-1.0);
- <a name="l04072"></a>04072 <span class="keywordflow">if</span> (!TSdata[w])
- <a name="l04073"></a>04073 {
- <a name="l04074"></a>04074 TSdata[w] = <a class="code" href="pumax_8c.html#a2ec2314ef785dc1cddc562590cd034ad">FloatAlloc</a>(DimXY,<span class="stringliteral">"ISOLON"</span>);
- <a name="l04075"></a>04075 MaxZ[w] = <a class="code" href="pumax_8c.html#a510628f6a0e0c51b4ca6492e4d8595e0">DimZ</a>;
- <a name="l04076"></a>04076 Indez[w] = DimZ / 4;
- <a name="l04077"></a>04077 <a class="code" href="pumax_8c.html#ac78f1f279638bfd177687a680c4c21ce">SwitchIndez</a>(w,0); <span class="comment">// Initialize title</span>
- <a name="l04078"></a>04078 }
- <a name="l04079"></a>04079 Field = TSdata[w];
- <a name="l04080"></a>04080 <span class="keywordflow">for</span> (j=0,i=0,k=DimX*Indez[w] ; j < <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a> ; ++j,i+=<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>,k+=DimX*<a class="code" href="pumax_8c.html#a510628f6a0e0c51b4ca6492e4d8595e0">DimZ</a>)
- <a name="l04081"></a>04081 {
- <a name="l04082"></a>04082 memcpy(Field+i,field+k,DimX * <span class="keyword">sizeof</span>(<a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a>)); <span class="comment">// copy latitude</span>
- <a name="l04083"></a>04083 }
- <a name="l04084"></a>04084 }
- <a name="l04085"></a>04085
- <a name="l04086"></a>04086 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#a5cacfe29b73c60abfa48f1ab23b8d631">ISOHOV</a>)
- <a name="l04087"></a>04087 {
- <a name="l04088"></a>04088 DimX = dimx; <span class="comment">// NLON</span>
- <a name="l04089"></a>04089 DimY = <a class="code" href="pumax_8c.html#ad690a03cd8fa2b253d17c3b93e6ad279">DimT</a>; <span class="comment">// time</span>
- <a name="l04090"></a>04090 DimZ = dimy; <span class="comment">// NLAT</span>
- <a name="l04091"></a>04091 DimXY = DimX * <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a>;
- <a name="l04092"></a>04092 VGAX = (InXSize-1.0) / (DimX-1.0);
- <a name="l04093"></a>04093 VGAY = (InYSize-1.0) / (DimY-1.0);
- <a name="l04094"></a>04094 <span class="keywordflow">if</span> (!TSdata[w])
- <a name="l04095"></a>04095 {
- <a name="l04096"></a>04096 TSdata[w] = <a class="code" href="pumax_8c.html#a2ec2314ef785dc1cddc562590cd034ad">FloatAlloc</a>(DimXY,<span class="stringliteral">"ISOHOV"</span>);
- <a name="l04097"></a>04097 MaxZ[w] = <a class="code" href="pumax_8c.html#a510628f6a0e0c51b4ca6492e4d8595e0">DimZ</a>;
- <a name="l04098"></a>04098 Indez[w] = DimZ / 4;
- <a name="l04099"></a>04099 <a class="code" href="pumax_8c.html#ac78f1f279638bfd177687a680c4c21ce">SwitchIndez</a>(w,0); <span class="comment">// Initialize title</span>
- <a name="l04100"></a>04100 }
- <a name="l04101"></a>04101 Field = TSdata[w];
- <a name="l04102"></a>04102 memmove(Field+DimX,Field,(DimXY-DimX) * <span class="keyword">sizeof</span>(<a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a>)); <span class="comment">// scroll array</span>
- <a name="l04103"></a>04103 memcpy(Field,field+Indez[w]*DimX,DimX * <span class="keyword">sizeof</span>(<a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a>)); <span class="comment">// add line</span>
- <a name="l04104"></a>04104 }
- <a name="l04105"></a>04105
- <a name="l04106"></a>04106 <span class="comment">// Advance write pointer HovInx until end of DimX</span>
- <a name="l04107"></a>04107 <span class="comment">// then scroll array and reset pointer</span>
- <a name="l04108"></a>04108
- <a name="l04109"></a>04109 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#ad93abacbefeab6ede34e9110ebce9769">ISOTS</a>)
- <a name="l04110"></a>04110 {
- <a name="l04111"></a>04111 DimX = <a class="code" href="pumax_8c.html#ad690a03cd8fa2b253d17c3b93e6ad279">DimT</a>; <span class="comment">// time</span>
- <a name="l04112"></a>04112 DimY = dimx; <span class="comment">// # of variables</span>
- <a name="l04113"></a>04113 DimZ = dimz;
- <a name="l04114"></a>04114 DimXY = DimX * <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a>;
- <a name="l04115"></a>04115 VGAX = (InXSize-1.0) / (DimX-1.0);
- <a name="l04116"></a>04116 VGAY = (InYSize-1.0) / (DimY-1.0);
- <a name="l04117"></a>04117 <span class="keywordflow">if</span> (!TSdata[w])
- <a name="l04118"></a>04118 {
- <a name="l04119"></a>04119 TSdata[w] = <a class="code" href="pumax_8c.html#a2ec2314ef785dc1cddc562590cd034ad">FloatAlloc</a>(DimXY+DimX,<span class="stringliteral">"ISOTS"</span>);
- <a name="l04120"></a>04120 }
- <a name="l04121"></a>04121 tspt = TSdata[w];
- <a name="l04122"></a>04122 ++HovInx[w];
- <a name="l04123"></a>04123 <span class="keywordflow">if</span> (HovInx[w] >= DimX)
- <a name="l04124"></a>04124 {
- <a name="l04125"></a>04125 HovInx[w] = 0;
- <a name="l04126"></a>04126 memmove(tspt,tspt+DimX,DimXY * <span class="keyword">sizeof</span>(<a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a>)); <span class="comment">// scroll array</span>
- <a name="l04127"></a>04127 }
- <a name="l04128"></a>04128 <span class="keywordflow">for</span> (i=HovInx[w]+DimX-1,j=0 ; j < <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a> ; i+=<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>,++j)
- <a name="l04129"></a>04129 tspt[i] = field[j]; <span class="comment">// add column</span>
- <a name="l04130"></a>04130 Field = tspt+HovInx[w];
- <a name="l04131"></a>04131 }
- <a name="l04132"></a>04132
- <a name="l04133"></a>04133 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#a35e0c3caf44835d5c02d3af3b975e21b">ISOCOL</a>)
- <a name="l04134"></a>04134 {
- <a name="l04135"></a>04135 DimX = <a class="code" href="pumax_8c.html#ad690a03cd8fa2b253d17c3b93e6ad279">DimT</a>; <span class="comment">// time</span>
- <a name="l04136"></a>04136 DimY = dimx; <span class="comment">// level</span>
- <a name="l04137"></a>04137 DimZ = dimy; <span class="comment">// clickable index</span>
- <a name="l04138"></a>04138 DimXY = DimX * <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a>;
- <a name="l04139"></a>04139 VGAX = (InXSize-1.0) / (DimX-1.0);
- <a name="l04140"></a>04140 VGAY = (InYSize-1.0) / (DimY-1.0);
- <a name="l04141"></a>04141 <span class="keywordflow">if</span> (!TSdata[w])
- <a name="l04142"></a>04142 {
- <a name="l04143"></a>04143 TSdata[w] = <a class="code" href="pumax_8c.html#a2ec2314ef785dc1cddc562590cd034ad">FloatAlloc</a>(DimXY+DimX,<span class="stringliteral">"ISOCOL"</span>);
- <a name="l04144"></a>04144 MaxZ[w] = <a class="code" href="pumax_8c.html#a510628f6a0e0c51b4ca6492e4d8595e0">DimZ</a>;
- <a name="l04145"></a>04145 Indez[w] = DimZ / 2;
- <a name="l04146"></a>04146 <a class="code" href="pumax_8c.html#ac78f1f279638bfd177687a680c4c21ce">SwitchIndez</a>(w,0); <span class="comment">// Initialize title</span>
- <a name="l04147"></a>04147 }
- <a name="l04148"></a>04148 tspt = TSdata[w];
- <a name="l04149"></a>04149 ++HovInx[w];
- <a name="l04150"></a>04150 <span class="keywordflow">if</span> (HovInx[w] >= DimX)
- <a name="l04151"></a>04151 {
- <a name="l04152"></a>04152 HovInx[w] = 0;
- <a name="l04153"></a>04153 memmove(tspt,tspt+DimX,DimXY * <span class="keyword">sizeof</span>(<a class="code" href="pumax_8c.html#a4b654506f18b8bfd61ad2a29a7e38c25">REAL</a>)); <span class="comment">// scroll array</span>
- <a name="l04154"></a>04154 }
- <a name="l04155"></a>04155 <span class="keywordflow">for</span> (i=HovInx[w]+DimX-1,j=0 ; j < <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a> ; i+=<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>,++j)
- <a name="l04156"></a>04156 tspt[i] = field[j+Indez[w]*DimY]; <span class="comment">// add column</span>
- <a name="l04157"></a>04157 Field = tspt+HovInx[w];
- <a name="l04158"></a>04158 }
- <a name="l04159"></a>04159
- <a name="l04160"></a>04160 <span class="keywordflow">if</span> (DimX > FlagSize)
- <a name="l04161"></a>04161 {
- <a name="l04162"></a>04162 <span class="keywordflow">if</span> (Flag) free(Flag);
- <a name="l04163"></a>04163 Flag = <a class="code" href="pumax_8c.html#a97eea41da1321e51271d6dd6c42219cb">IntAlloc</a>(DimX,<span class="stringliteral">"Flag"</span>);
- <a name="l04164"></a>04164 FlagSize = <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>;
- <a name="l04165"></a>04165 }
- <a name="l04166"></a>04166
- <a name="l04167"></a>04167 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#ae41274f4b33dfd046884def7709aa887">ISOSH</a>) pal = 1; <span class="comment">// ISOSH has its own palette</span>
- <a name="l04168"></a>04168 <span class="keywordflow">if</span> (pal < 1 || pal >= <a class="code" href="pumax_8c.html#afa68e13002f97f4041b7acca426be273">NUMPAL</a>)
- <a name="l04169"></a>04169 {
- <a name="l04170"></a>04170 Cstrip = <a class="code" href="pumax_8c.html#a0f1e694b411614c27c69b2b2ac6d293d">Autostrip</a>;
- <a name="l04171"></a>04171 <a class="code" href="pumax_8c.html#a2bf6b3944a8626182a54245cb8dcea36">AutoPalette</a>(w,Cstrip,Field,DimXY);
- <a name="l04172"></a>04172 Lines = <a class="code" href="pumax_8c.html#a7f2aa7d59c57b8054e230e2f72564671">AUTOCOLORS</a>;
- <a name="l04173"></a>04173 <span class="comment">// printf("Autopalette %d for Win %d\n",pal,w);</span>
- <a name="l04174"></a>04174 }
- <a name="l04175"></a>04175 <span class="keywordflow">else</span>
- <a name="l04176"></a>04176 {
- <a name="l04177"></a>04177 Cstrip = Pallet[<a class="code" href="pumax_8c.html#a90b1e0ef9cf6b06a7711e79eaa1e0618">pal</a>];
- <a name="l04178"></a>04178 Lines = LineCo[<a class="code" href="pumax_8c.html#a90b1e0ef9cf6b06a7711e79eaa1e0618">pal</a>];
- <a name="l04179"></a>04179 }
- <a name="l04180"></a>04180
- <a name="l04181"></a>04181 SizeChanged = (<a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[w].<a class="code" href="struct_pix_struct.html#a8cfaa77a4a7e9675273fce59dc437ef4">DimX</a> != WinXSize || <a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[w].<a class="code" href="struct_pix_struct.html#a605b726f604da7ec98575dec3da238c8">DimY</a> != <a class="code" href="pumax_8c.html#a48ba2c20a7bf82da8f16252eff21155f">WinYSize</a>);
- <a name="l04182"></a>04182 <span class="keywordflow">if</span> (SizeChanged)
- <a name="l04183"></a>04183 {
- <a name="l04184"></a>04184 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[w].Pix) XFreePixmap(display,<a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[w].Pix);
- <a name="l04185"></a>04185 <a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[w].<a class="code" href="struct_pix_struct.html#a7e7807591a26e2daa2f16ad2599a2b34">Pix</a> = XCreatePixmap(display,Win[w],WinXSize,WinYSize,ScreenD);
- <a name="l04186"></a>04186 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>)
- <a name="l04187"></a>04187 printf(<span class="stringliteral">"CreatePixmap %10x %6d bytes\n"</span>,
- <a name="l04188"></a>04188 (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)<a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[w].Pix,WinXSize*WinYSize);
- <a name="l04189"></a>04189 <a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[w].<a class="code" href="struct_pix_struct.html#a8cfaa77a4a7e9675273fce59dc437ef4">DimX</a> = <a class="code" href="pumax_8c.html#a90fa18336f52663513916236b6c3f633">WinXSize</a>;
- <a name="l04190"></a>04190 <a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[w].<a class="code" href="struct_pix_struct.html#a605b726f604da7ec98575dec3da238c8">DimY</a> = <a class="code" href="pumax_8c.html#a48ba2c20a7bf82da8f16252eff21155f">WinYSize</a>;
- <a name="l04191"></a>04191 }
- <a name="l04192"></a>04192 pix = <a class="code" href="pumax_8c.html#a66932718d5aaaf8cd382d6e8e681b96a">WinPixMap</a>[w].<a class="code" href="struct_pix_struct.html#a7e7807591a26e2daa2f16ad2599a2b34">Pix</a>; <span class="comment">/* Set current pixmap */</span>
- <a name="l04193"></a>04193
- <a name="l04194"></a>04194 <span class="comment">/* Draw colour bar */</span>
- <a name="l04195"></a>04195
- <a name="l04196"></a>04196 <span class="keywordflow">if</span> ((SizeChanged || Cstrip == Autostrip) &&
- <a name="l04197"></a>04197 (PicType == <a class="code" href="pumax_8c.html#afc9e7bd37f3dc38ff12cdf5edb85a6d2">ISOCS</a> || PicType == <a class="code" href="pumax_8c.html#a2f1d89ef346ef5189b556085f4553c4c">ISOHOR</a> ||
- <a name="l04198"></a>04198 PicType == <a class="code" href="pumax_8c.html#a5cacfe29b73c60abfa48f1ab23b8d631">ISOHOV</a> || PicType == <a class="code" href="pumax_8c.html#ad3652a10b82037800a3efb555fb7833c">ISOLON</a> ||
- <a name="l04199"></a>04199 PicType == <a class="code" href="pumax_8c.html#a35e0c3caf44835d5c02d3af3b975e21b">ISOCOL</a> || PicType == <a class="code" href="pumax_8c.html#a3e3bcad4c273544328bcdcaef35c3852">MAPHOR</a> ))
- <a name="l04200"></a>04200 {
- <a name="l04201"></a>04201 XSetForeground(display,gc,BlackPix);
- <a name="l04202"></a>04202 XFillRectangle(display,pix,gc,0,InYSize,WinXSize,WinYSize);
- <a name="l04203"></a>04203
- <a name="l04204"></a>04204 CapLines = WinXSize / (20 + 3 * <a class="code" href="pumax_8c.html#ae7e27f08b8bcd6f7cf63edc4b0859d7f">FixFontWidth</a>);
- <a name="l04205"></a>04205 <span class="keywordflow">if</span> (CapLines > Lines) CapLines = <a class="code" href="pumax_8c.html#ab36270a976b49e0122723b7d3bd35b95">Lines</a>;
- <a name="l04206"></a>04206 <span class="keywordflow">for</span> (i=0 ; i < CapLines ; ++i)
- <a name="l04207"></a>04207 {
- <a name="l04208"></a>04208 XSetForeground(display,gc,Cstrip[i].pixel);
- <a name="l04209"></a>04209 XFillRectangle(display,pix,gc,OffX+5+i*(WinXSize-20)/(CapLines-1),
- <a name="l04210"></a>04210 OffY+InYSize+5,10,10);
- <a name="l04211"></a>04211 XSetForeground(display,gc,BlackPix);
- <a name="l04212"></a>04212 XDrawRectangle(display,pix,gc,OffX+5+i*(WinXSize-20)/(CapLines-1),
- <a name="l04213"></a>04213 OffY+InYSize+5,10,10);
- <a name="l04214"></a>04214 }
- <a name="l04215"></a>04215 XSetForeground(display,gc,WhitePix);
- <a name="l04216"></a>04216 XSetBackground(display,gc,BlackPix);
- <a name="l04217"></a>04217 rb = Cstrip[CapLines-2].<a class="code" href="struct_color_strip.html#a6deff3a5a5614df503a3af930233730b">Hi</a> - Cstrip[0].<a class="code" href="struct_color_strip.html#a6deff3a5a5614df503a3af930233730b">Hi</a>;
- <a name="l04218"></a>04218 <span class="keywordflow">for</span> (i=0 ; i < CapLines-1 ; ++i)
- <a name="l04219"></a>04219 {
- <a name="l04220"></a>04220 Text[0] = 0;
- <a name="l04221"></a>04221 ra = Cstrip[i].<a class="code" href="struct_color_strip.html#a6deff3a5a5614df503a3af930233730b">Hi</a>;
- <a name="l04222"></a>04222 j = ra;
- <a name="l04223"></a>04223 <span class="keywordflow">if</span> (j > -1000 && j < 10000) sprintf(Text,<span class="stringliteral">"%d"</span>,j);
- <a name="l04224"></a>04224 <span class="keywordflow">if</span> (ra < 100.0 && ra > -9.99)
- <a name="l04225"></a>04225 {
- <a name="l04226"></a>04226 sprintf(Text,<span class="stringliteral">"%4.1f"</span>,ra);
- <a name="l04227"></a>04227 <span class="keywordflow">if</span> (!strcmp(Text+2,<span class="stringliteral">".0"</span>)) Text[2] = 0;
- <a name="l04228"></a>04228 }
- <a name="l04229"></a>04229 <span class="keywordflow">if</span> (ra < 10.0 && ra >= 0.0)
- <a name="l04230"></a>04230 {
- <a name="l04231"></a>04231 sprintf(Text,<span class="stringliteral">"%4.2f"</span>,ra);
- <a name="l04232"></a>04232 <span class="keywordflow">if</span> (!strcmp(Text+1,<span class="stringliteral">".00"</span>)) Text[1] = 0;
- <a name="l04233"></a>04233 }
- <a name="l04234"></a>04234 len = strlen(Text);
- <a name="l04235"></a>04235 <span class="keywordflow">if</span> (len)
- <a name="l04236"></a>04236 {
- <a name="l04237"></a>04237 width = XTextWidth(FixFont,Text,len);
- <a name="l04238"></a>04238 height = FixFont->ascent + FixFont->descent;
- <a name="l04239"></a>04239 xp = OffX + 10 + (i+0.5) * (WinXSize-20)/(CapLines-1) - width/2;
- <a name="l04240"></a>04240 yp = WinYSize - height + 10;
- <a name="l04241"></a>04241 XDrawImageString(display,pix,gc,xp,yp,Text,len);
- <a name="l04242"></a>04242 }
- <a name="l04243"></a>04243 }
- <a name="l04244"></a>04244 }
- <a name="l04245"></a>04245
- <a name="l04246"></a>04246 <span class="comment">/* Draw mode legend */</span>
- <a name="l04247"></a>04247
- <a name="l04248"></a>04248 <span class="keywordflow">if</span> (SizeChanged && PicType == <a class="code" href="pumax_8c.html#ae41274f4b33dfd046884def7709aa887">ISOSH</a>)
- <a name="l04249"></a>04249 {
- <a name="l04250"></a>04250 dx = WinXSize / 23;
- <a name="l04251"></a>04251 XSetForeground(display,gc,BlackPix);
- <a name="l04252"></a>04252 XFillRectangle(display,pix,gc,0,0,WinXSize,WinYSize);
- <a name="l04253"></a>04253
- <a name="l04254"></a>04254 XSetForeground(display,gc,LightGreen.pixel);
- <a name="l04255"></a>04255 XSetBackground(display,gc,BlackPix);
- <a name="l04256"></a>04256 <span class="keywordflow">for</span> (i=0 ; i < 21 ; i+=2)
- <a name="l04257"></a>04257 {
- <a name="l04258"></a>04258 sprintf(Text,<span class="stringliteral">"%d"</span>,i);
- <a name="l04259"></a>04259 len = strlen(Text);
- <a name="l04260"></a>04260 width = XTextWidth(FixFont,Text,len);
- <a name="l04261"></a>04261 height = FixFont->ascent + FixFont->descent;
- <a name="l04262"></a>04262 xp = dx + i * dx - width/2 - FixFontWidth/2 + 1;
- <a name="l04263"></a>04263 yp = <a class="code" href="pumax_8c.html#add5a8c33565a2bbcf55996cccc7a434b">FixFontHeight</a>;
- <a name="l04264"></a>04264 XDrawImageString(display,pix,gc,xp,yp,Text,len);
- <a name="l04265"></a>04265 }
- <a name="l04266"></a>04266 XSetForeground(display,gc,LightBlue.pixel);
- <a name="l04267"></a>04267 <span class="keywordflow">for</span> (i=0 ; i < 21 ; i+=2)
- <a name="l04268"></a>04268 {
- <a name="l04269"></a>04269 sprintf(Text,<span class="stringliteral">"%d"</span>,i);
- <a name="l04270"></a>04270 len = strlen(Text);
- <a name="l04271"></a>04271 width = XTextWidth(FixFont,Text,len);
- <a name="l04272"></a>04272 height = FixFont->ascent + FixFont->descent;
- <a name="l04273"></a>04273 xp = WinXSize - width - 2;
- <a name="l04274"></a>04274 yp = 2 * FixFontHeight + i * dx;
- <a name="l04275"></a>04275 <span class="keywordflow">if</span> (yp+FixFont->descent > InYSize) <span class="keywordflow">break</span>;
- <a name="l04276"></a>04276 XDrawImageString(display,pix,gc,xp,yp,Text,len);
- <a name="l04277"></a>04277 }
- <a name="l04278"></a>04278 strcpy(Text,<span class="stringliteral">"n/m"</span>);
- <a name="l04279"></a>04279 len = strlen(Text);
- <a name="l04280"></a>04280 width = XTextWidth(FixFont,Text,len);
- <a name="l04281"></a>04281 xp = WinXSize - width - 2;
- <a name="l04282"></a>04282 yp = <a class="code" href="pumax_8c.html#add5a8c33565a2bbcf55996cccc7a434b">FixFontHeight</a>;
- <a name="l04283"></a>04283 XSetForeground(display,gc,WhitePix);
- <a name="l04284"></a>04284 XDrawImageString(display,pix,gc,xp,yp,Text,len);
- <a name="l04285"></a>04285 strcpy(Text,<span class="stringliteral">"High "</span>);
- <a name="l04286"></a>04286 len = strlen(Text);
- <a name="l04287"></a>04287 width = XTextWidth(FixFont,Text,len);
- <a name="l04288"></a>04288 xp = WinXSize/2 - <a class="code" href="pumax_8c.html#a9923377bd967d1dd49eb98f009f48fc2">AMPLI_COLS</a> * 10 - width;
- <a name="l04289"></a>04289 yp = WinYSize - FixFontHeight + 10;
- <a name="l04290"></a>04290 r = FixFontHeight-2;
- <a name="l04291"></a>04291 XSetForeground(display,gc,WhitePix);
- <a name="l04292"></a>04292 <span class="keywordflow">if</span> (xp > 0) XDrawImageString(display,pix,gc,xp,yp,Text,len);
- <a name="l04293"></a>04293 strcpy(Text,<span class="stringliteral">" Low"</span>);
- <a name="l04294"></a>04294 len = strlen(Text);
- <a name="l04295"></a>04295 width = XTextWidth(FixFont,Text,len);
- <a name="l04296"></a>04296 xp = WinXSize/2 + <a class="code" href="pumax_8c.html#a9923377bd967d1dd49eb98f009f48fc2">AMPLI_COLS</a> * 10;
- <a name="l04297"></a>04297 <span class="keywordflow">if</span> (xp + width < WinXSize) XDrawImageString(display,pix,gc,xp,yp,Text,len);
- <a name="l04298"></a>04298 yp = <a class="code" href="pumax_8c.html#a2e0311fae05aa716cc8cd6669af5bf3a">InYSize</a>;
- <a name="l04299"></a>04299 XDrawLine(display,pix,gc,OffX,yp,WinXSize,yp);
- <a name="l04300"></a>04300 yp = WinYSize - r - FixFont->descent;
- <a name="l04301"></a>04301
- <a name="l04302"></a>04302 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#a9923377bd967d1dd49eb98f009f48fc2">AMPLI_COLS</a> ; ++i)
- <a name="l04303"></a>04303 {
- <a name="l04304"></a>04304 xp = WinXSize/2 - AMPLI_COLS * 10 + i * 20;
- <a name="l04305"></a>04305 XSetForeground(display,gc,AmpliStrip[AMPLI_COLS-i-1].pixel);
- <a name="l04306"></a>04306 XFillArc(display,pix,gc,xp,yp,r,r,0,360*64);
- <a name="l04307"></a>04307 }
- <a name="l04308"></a>04308 }
- <a name="l04309"></a>04309
- <a name="l04310"></a>04310 <span class="keywordflow">if</span> (SizeChanged && PicType == <a class="code" href="pumax_8c.html#ad93abacbefeab6ede34e9110ebce9769">ISOTS</a>) <span class="comment">/* Timeseries Caption */</span>
- <a name="l04311"></a>04311 {
- <a name="l04312"></a>04312 XSetForeground(display,gc,BlackPix);
- <a name="l04313"></a>04313 XFillRectangle(display,pix,gc,0,InYSize,WinXSize,WinYSize);
- <a name="l04314"></a>04314 XSetBackground(display,gc,BlackPix);
- <a name="l04315"></a>04315
- <a name="l04316"></a>04316 xp = <a class="code" href="pumax_8c.html#ae7e27f08b8bcd6f7cf63edc4b0859d7f">FixFontWidth</a>;
- <a name="l04317"></a>04317 yp = WinYSize - FixFontHeight + 10;
- <a name="l04318"></a>04318 <span class="keywordflow">for</span> (j=0 ; j < <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a> ; ++j)
- <a name="l04319"></a>04319 {
- <a name="l04320"></a>04320 <span class="keywordflow">if</span> (TSName[j][0])
- <a name="l04321"></a>04321 {
- <a name="l04322"></a>04322 strcpy(Text,TSName[j]);
- <a name="l04323"></a>04323 len = strlen(Text);
- <a name="l04324"></a>04324 width = XTextWidth(FixFont,Text,len);
- <a name="l04325"></a>04325 XSetForeground(display,gc,TSColor[j]);
- <a name="l04326"></a>04326 XDrawImageString(display,pix,gc,xp,yp,Text,len);
- <a name="l04327"></a>04327 xp += width;
- <a name="l04328"></a>04328 }
- <a name="l04329"></a>04329 <span class="keywordflow">if</span> (TSubsc[j][0])
- <a name="l04330"></a>04330 {
- <a name="l04331"></a>04331 XSetFont(display, gc, SubFont->fid);
- <a name="l04332"></a>04332 strcpy(Text,TSubsc[j]);
- <a name="l04333"></a>04333 len = strlen(Text);
- <a name="l04334"></a>04334 width = XTextWidth(SubFont,Text,len);
- <a name="l04335"></a>04335 XSetForeground(display,gc,TSColor[j]);
- <a name="l04336"></a>04336 XDrawImageString(display,pix,gc,xp,yp,Text,len);
- <a name="l04337"></a>04337 xp += width;
- <a name="l04338"></a>04338 XSetFont(display, gc, FixFont->fid);
- <a name="l04339"></a>04339 }
- <a name="l04340"></a>04340 xp += <a class="code" href="pumax_8c.html#ae7e27f08b8bcd6f7cf63edc4b0859d7f">FixFontWidth</a>;
- <a name="l04341"></a>04341 }
- <a name="l04342"></a>04342 }
- <a name="l04343"></a>04343
- <a name="l04344"></a>04344 <span class="keywordflow">if</span> (SizeChanged && PicType == <a class="code" href="pumax_8c.html#aa817497929617f9ee37a0e957c9e21e1">ISOTAB</a>) <span class="comment">/* Table Caption */</span>
- <a name="l04345"></a>04345 {
- <a name="l04346"></a>04346 XSetForeground(display,gc,BlackPix);
- <a name="l04347"></a>04347 XFillRectangle(display,pix,gc,0,0,WinXSize,WinYSize);
- <a name="l04348"></a>04348 XSetBackground(display,gc,BlackPix);
- <a name="l04349"></a>04349 }
- <a name="l04350"></a>04350
- <a name="l04351"></a>04351 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#ad93abacbefeab6ede34e9110ebce9769">ISOTS</a>)
- <a name="l04352"></a>04352 {
- <a name="l04353"></a>04353 <span class="keywordflow">if</span> (TSxp[w] == NULL) TSxp[w] = <a class="code" href="pumax_8c.html#aa507b1280c95bd8fb1d42c60d91e02ff">SizeAlloc</a>(DimX * DimY , <span class="keyword">sizeof</span>(XPoint),<span class="stringliteral">"TSxp"</span>);
- <a name="l04354"></a>04354 <span class="keywordflow">if</span> (Dmin[w] == NULL) Dmin[w] = <a class="code" href="pumax_8c.html#a2ec2314ef785dc1cddc562590cd034ad">FloatAlloc</a>(DimY ,<span class="stringliteral">"Dmin"</span>);
- <a name="l04355"></a>04355 <span class="keywordflow">if</span> (Dmax[w] == NULL) Dmax[w] = <a class="code" href="pumax_8c.html#a2ec2314ef785dc1cddc562590cd034ad">FloatAlloc</a>(DimY ,<span class="stringliteral">"Dmax"</span>);
- <a name="l04356"></a>04356 XSetForeground(display,gc,BlackPix);
- <a name="l04357"></a>04357 XFillRectangle(display,pix,gc,0,0,WinXSize,InYSize);
- <a name="l04358"></a>04358
- <a name="l04359"></a>04359 <span class="keywordflow">for</span> (j=0 ; j < <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a> ; ++j) Dmin[w][j] = Dmax[w][j] = field[j];
- <a name="l04360"></a>04360 <span class="keywordflow">if</span> (nstep > 2)
- <a name="l04361"></a>04361 {
- <a name="l04362"></a>04362 <span class="keywordflow">for</span> (j=0 ; j < <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a> ; ++j)
- <a name="l04363"></a>04363 {
- <a name="l04364"></a>04364 <span class="keywordflow">for</span> (i=1 ; i < <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a> ; ++i)
- <a name="l04365"></a>04365 {
- <a name="l04366"></a>04366 Dmin[w][j] = <a class="code" href="pumax_8c.html#a3acffbd305ee72dcd4593c0d8af64a4f">MIN</a>(Dmin[w][j],Field[i+j*DimX]);
- <a name="l04367"></a>04367 Dmax[w][j] = <a class="code" href="pumax_8c.html#afa99ec4acc4ecb2dc3c2d05da15d0e3f">MAX</a>(Dmax[w][j],Field[i+j*DimX]);
- <a name="l04368"></a>04368 }
- <a name="l04369"></a>04369 }
- <a name="l04370"></a>04370 }
- <a name="l04371"></a>04371
- <a name="l04372"></a>04372 <span class="keywordflow">if</span> (nstep > 2)
- <a name="l04373"></a>04373 <span class="keywordflow">for</span> (j=0 ; j < <a class="code" href="pumax_8c.html#ace2f02cb6559cc7f528a995935d30878">DimY</a> ; ++j)
- <a name="l04374"></a>04374 {
- <a name="l04375"></a>04375 XSetForeground(display,gc,TSColor[j]);
- <a name="l04376"></a>04376 o = Dmin[w][j];
- <a name="l04377"></a>04377 <span class="keywordflow">if</span> ((Dmax[w][j] - Dmin[w][j]) > 1.0e-20) f = (InYSize-2) / (Dmax[w][j] - Dmin[w][j]);
- <a name="l04378"></a>04378 <span class="keywordflow">else</span> f = 1.0;
- <a name="l04379"></a>04379
- <a name="l04380"></a>04380 <span class="keywordflow">for</span> (i=1 ; i < <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a> ; ++i)
- <a name="l04381"></a>04381 {
- <a name="l04382"></a>04382 TSxp[w][i].x = VGAX * i;
- <a name="l04383"></a>04383 TSxp[w][i].y = InYSize - 1 - f * (Field[i+j*<a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a>] - o);
- <a name="l04384"></a>04384 }
- <a name="l04385"></a>04385 XDrawLines(display,pix,gc,TSxp[w]+1,DimX-1,CoordModeOrigin);
- <a name="l04386"></a>04386 }
- <a name="l04387"></a>04387 }
- <a name="l04388"></a>04388
- <a name="l04389"></a>04389 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#aa817497929617f9ee37a0e957c9e21e1">ISOTAB</a>)
- <a name="l04390"></a>04390 {
- <a name="l04391"></a>04391 XSetForeground(display,gc,BlackPix);
- <a name="l04392"></a>04392 XSetBackground(display,gc,BlackPix);
- <a name="l04393"></a>04393 XFillRectangle(display,pix,gc,0,0,WinXSize,InYSize);
- <a name="l04394"></a>04394 XSetFont(display, gc, BigFont->fid);
- <a name="l04395"></a>04395 yp = <a class="code" href="pumax_8c.html#a1d2254b4c4eccb72efc38d231910fe68">BigFontHeight</a>;
- <a name="l04396"></a>04396 <span class="keywordflow">for</span> (j=0 ; j < <a class="code" href="pumax_8c.html#a5f68902fe231a6694f89b7f19dd000ce">DimX</a> ; ++j)
- <a name="l04397"></a>04397 <span class="keywordflow">if</span> (TSName[j][0])
- <a name="l04398"></a>04398 {
- <a name="l04399"></a>04399 XSetForeground(display,gc,TSColor[j]);
- <a name="l04400"></a>04400 xp = <a class="code" href="pumax_8c.html#aefafab89c009b3e4258f1216ae91e76c">BigFontWidth</a>;
- <a name="l04401"></a>04401 strcpy(Text,TSName[j]);
- <a name="l04402"></a>04402 len = strlen(Text);
- <a name="l04403"></a>04403 XDrawImageString(display,pix,gc,xp,yp,Text,len);
- <a name="l04404"></a>04404 xp += XTextWidth(BigFont,Text,len);
- <a name="l04405"></a>04405 <span class="keywordflow">if</span> (TSubsc[j][0])
- <a name="l04406"></a>04406 {
- <a name="l04407"></a>04407 XSetFont(display, gc, FixFont->fid);
- <a name="l04408"></a>04408 XDrawImageString(display,pix,gc,xp,yp,TSubsc[j],strlen(TSubsc[j]));
- <a name="l04409"></a>04409 XSetFont(display, gc, BigFont->fid);
- <a name="l04410"></a>04410 }
- <a name="l04411"></a>04411 xp = 8 * <a class="code" href="pumax_8c.html#aefafab89c009b3e4258f1216ae91e76c">BigFontWidth</a>;
- <a name="l04412"></a>04412 <span class="keywordflow">if</span> (TSUnit[j][0])
- <a name="l04413"></a>04413 {
- <a name="l04414"></a>04414 sprintf(Text,<span class="stringliteral">"= %7.3f [%s]"</span>,field[j],TSUnit[j]);
- <a name="l04415"></a>04415 <span class="keywordflow">if</span> (TScale[j][0]) strcat(Text,<span class="stringliteral">" 10"</span>);
- <a name="l04416"></a>04416 len = strlen(Text);
- <a name="l04417"></a>04417 XDrawImageString(display,pix,gc,xp,yp,Text,len);
- <a name="l04418"></a>04418 <span class="keywordflow">if</span> (TScale[j][0] > <span class="charliteral">' '</span>)
- <a name="l04419"></a>04419 {
- <a name="l04420"></a>04420 lens = strlen(TScale[j]);
- <a name="l04421"></a>04421 XSetFont(display, gc, FixFont->fid);
- <a name="l04422"></a>04422 XDrawImageString(display,pix,gc,xp+len*BigFontWidth,yp-BigFontHeight+FixFontHeight,TScale[j],lens);
- <a name="l04423"></a>04423 XSetFont(display, gc, BigFont->fid);
- <a name="l04424"></a>04424 }
- <a name="l04425"></a>04425 }
- <a name="l04426"></a>04426 yp += <a class="code" href="pumax_8c.html#a1d2254b4c4eccb72efc38d231910fe68">BigFontHeight</a>;
- <a name="l04427"></a>04427 }
- <a name="l04428"></a>04428 XSetFont(display, gc, FixFont->fid);
- <a name="l04429"></a>04429 }
- <a name="l04430"></a>04430
- <a name="l04431"></a>04431 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#a4c30d0a50533694deda0fcf3551b6935">ISOTRA</a>)
- <a name="l04432"></a>04432 {
- <a name="l04433"></a>04433 XSetForeground(display,gc,BlackPix);
- <a name="l04434"></a>04434 XFillRectangle(display,pix,gc,0,0,WinXSize,InYSize);
- <a name="l04435"></a>04435 <span class="keywordflow">if</span> (SizeChanged) <a class="code" href="pumax_8c.html#af2e92313aaf18974c4fa6c1cb34cd7a3">ClearTracer</a>();
- <a name="l04436"></a>04436 <a class="code" href="pumax_8c.html#ab15932b28ace63693c23be5e639ed1d9">TracerPlot</a>(w);
- <a name="l04437"></a>04437 }
- <a name="l04438"></a>04438 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#a1572b520f538d357372e96d0185275e5">MAPTRA</a>)
- <a name="l04439"></a>04439 {
- <a name="l04440"></a>04440 <span class="keywordflow">if</span> (SizeChanged) <a class="code" href="pumax_8c.html#af2e92313aaf18974c4fa6c1cb34cd7a3">ClearTracer</a>();
- <a name="l04441"></a>04441 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a0aac8b0778521c19e621a6b60b3e1a4b">MapHR</a>.<a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>)
- <a name="l04442"></a>04442 {
- <a name="l04443"></a>04443 <span class="keywordflow">if</span> (MapPro[w] == <a class="code" href="pumax_8c.html#aae4090be0e30c18b0f22650479767d8f">AZIMUTHAL</a>)
- <a name="l04444"></a>04444 {
- <a name="l04445"></a>04445 <span class="keywordflow">if</span> (RedrawFlag[w] || <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].w != WinXSize || <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].h != InYSize ||
- <a name="l04446"></a>04446 (nstep % rmui == 0 && <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].f != 0))
- <a name="l04447"></a>04447 {
- <a name="l04448"></a>04448 RedrawFlag[w] = 0;
- <a name="l04449"></a>04449 <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a> = <a class="code" href="pumax_8c.html#a90fa18336f52663513916236b6c3f633">WinXSize</a>;
- <a name="l04450"></a>04450 <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a> = <a class="code" href="pumax_8c.html#a2e0311fae05aa716cc8cd6669af5bf3a">InYSize</a>;
- <a name="l04451"></a>04451 <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a> += <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a0c135dc0852d411fd87b7ac84ba55664">r</a>;
- <a name="l04452"></a>04452 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].l < -180.0) <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a> += 360.0;
- <a name="l04453"></a>04453 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].l > 180.0) <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a> -= 360.0;
- <a name="l04454"></a>04454 <a class="code" href="pumax_8c.html#ad027458730957d93b4a352feed5ea06d">AzimuthalImage</a>(&<a class="code" href="pumax_8c.html#a0aac8b0778521c19e621a6b60b3e1a4b">MapHR</a>,&<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w]);
- <a name="l04455"></a>04455 }
- <a name="l04456"></a>04456 }
- <a name="l04457"></a>04457 <span class="keywordflow">else</span>
- <a name="l04458"></a>04458 {
- <a name="l04459"></a>04459 <span class="keywordflow">if</span> (RedrawFlag[w] || <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].w != WinXSize || <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].h != InYSize)
- <a name="l04460"></a>04460 {
- <a name="l04461"></a>04461 RedrawFlag[w] = 0;
- <a name="l04462"></a>04462 <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a> = <a class="code" href="pumax_8c.html#a90fa18336f52663513916236b6c3f633">WinXSize</a>;
- <a name="l04463"></a>04463 <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a> = <a class="code" href="pumax_8c.html#a2e0311fae05aa716cc8cd6669af5bf3a">InYSize</a>;
- <a name="l04464"></a>04464 <span class="keywordflow">if</span> (MapPro[w] == 1) <a class="code" href="pumax_8c.html#a2a67fb15956dca4db41c85496c11240e">PolarImage</a>(&<a class="code" href="pumax_8c.html#a0aac8b0778521c19e621a6b60b3e1a4b">MapHR</a>,&<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w]);
- <a name="l04465"></a>04465 <span class="keywordflow">else</span> <a class="code" href="pumax_8c.html#a662cbf19367e08f6e376f8d1e3b765e0">ScaleImage</a>(&<a class="code" href="pumax_8c.html#a0aac8b0778521c19e621a6b60b3e1a4b">MapHR</a>,&<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w]);
- <a name="l04466"></a>04466 }
- <a name="l04467"></a>04467 }
- <a name="l04468"></a>04468 XPutImage(display,pix,gc,<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].X,0,0,0,0,<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].w,<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].h);
- <a name="l04469"></a>04469 }
- <a name="l04470"></a>04470 <span class="keywordflow">else</span>
- <a name="l04471"></a>04471 {
- <a name="l04472"></a>04472 XSetForeground(display,gc,BlackPix);
- <a name="l04473"></a>04473 XFillRectangle(display,pix,gc,0,0,WinXSize,InYSize);
- <a name="l04474"></a>04474 }
- <a name="l04475"></a>04475 <a class="code" href="pumax_8c.html#ab15932b28ace63693c23be5e639ed1d9">TracerPlot</a>(w);
- <a name="l04476"></a>04476 }
- <a name="l04477"></a>04477 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#afc9e7bd37f3dc38ff12cdf5edb85a6d2">ISOCS</a> || PicType == <a class="code" href="pumax_8c.html#a2f1d89ef346ef5189b556085f4553c4c">ISOHOR</a> || PicType == <a class="code" href="pumax_8c.html#ad3652a10b82037800a3efb555fb7833c">ISOLON</a> || PicType == <a class="code" href="pumax_8c.html#a35e0c3caf44835d5c02d3af3b975e21b">ISOCOL</a>)
- <a name="l04478"></a>04478 {
- <a name="l04479"></a>04479 XSetForeground(display,gc,BlackPix);
- <a name="l04480"></a>04480 XFillRectangle(display,pix,gc,0,0,WinXSize,InYSize);
- <a name="l04481"></a>04481 <a class="code" href="pumax_8c.html#a84c2cc0435ae795bd3d15064ffea1501">IsoAreas</a>(Cstrip);
- <a name="l04482"></a>04482 <a class="code" href="pumax_8c.html#a7e589e7ff7d5125738a34547b5756253">IsoLines</a>(Cstrip,0);
- <a name="l04483"></a>04483 }
- <a name="l04484"></a>04484 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#a3e3bcad4c273544328bcdcaef35c3852">MAPHOR</a>)
- <a name="l04485"></a>04485 {
- <a name="l04486"></a>04486 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a0aac8b0778521c19e621a6b60b3e1a4b">MapHR</a>.<a class="code" href="struct_map_image_struct.html#aaa7ba55126fe38d8113c9143d2528560">X</a>)
- <a name="l04487"></a>04487 {
- <a name="l04488"></a>04488 <span class="keywordflow">if</span> (MapPro[w] == <a class="code" href="pumax_8c.html#aae4090be0e30c18b0f22650479767d8f">AZIMUTHAL</a>)
- <a name="l04489"></a>04489 {
- <a name="l04490"></a>04490 <span class="keywordflow">if</span> (RedrawFlag[w] || <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].w != WinXSize || <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].h != InYSize ||
- <a name="l04491"></a>04491 (nstep % rmui == 0 && <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].f != 0))
- <a name="l04492"></a>04492 {
- <a name="l04493"></a>04493 RedrawFlag[w] = 0;
- <a name="l04494"></a>04494 <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a> = <a class="code" href="pumax_8c.html#a90fa18336f52663513916236b6c3f633">WinXSize</a>;
- <a name="l04495"></a>04495 <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a> = <a class="code" href="pumax_8c.html#a2e0311fae05aa716cc8cd6669af5bf3a">InYSize</a>;
- <a name="l04496"></a>04496 <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a> += <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a0c135dc0852d411fd87b7ac84ba55664">r</a>;
- <a name="l04497"></a>04497 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].l < -180.0) <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a> += 360.0;
- <a name="l04498"></a>04498 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].l > 180.0) <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a46fe3297a24177fa1aef6e5cf19a4b4b">l</a> -= 360.0;
- <a name="l04499"></a>04499 <a class="code" href="pumax_8c.html#ad027458730957d93b4a352feed5ea06d">AzimuthalImage</a>(&<a class="code" href="pumax_8c.html#a0aac8b0778521c19e621a6b60b3e1a4b">MapHR</a>,&<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w]);
- <a name="l04500"></a>04500 }
- <a name="l04501"></a>04501 XPutImage(display,pix,gc,<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].X,0,0,0,0,<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].w,<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].h);
- <a name="l04502"></a>04502 <a class="code" href="pumax_8c.html#aa0f5f3d7c6ce01b3b6fda010e082dd77">MapLines</a>(Cstrip,1);
- <a name="l04503"></a>04503 }
- <a name="l04504"></a>04504 <span class="keywordflow">else</span>
- <a name="l04505"></a>04505 {
- <a name="l04506"></a>04506 <span class="keywordflow">if</span> (RedrawFlag[w] || <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].w != WinXSize || <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].h != InYSize)
- <a name="l04507"></a>04507 {
- <a name="l04508"></a>04508 RedrawFlag[w] = 0;
- <a name="l04509"></a>04509 <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a231ed4c4f5df4b3c414fe643d139bea8">w</a> = <a class="code" href="pumax_8c.html#a90fa18336f52663513916236b6c3f633">WinXSize</a>;
- <a name="l04510"></a>04510 <a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].<a class="code" href="struct_map_image_struct.html#a7c1e3b72791d55ecbe02d3325a69f882">h</a> = <a class="code" href="pumax_8c.html#a2e0311fae05aa716cc8cd6669af5bf3a">InYSize</a>;
- <a name="l04511"></a>04511 <span class="keywordflow">if</span> (MapPro[w] == 1) <a class="code" href="pumax_8c.html#a2a67fb15956dca4db41c85496c11240e">PolarImage</a>(&<a class="code" href="pumax_8c.html#a0aac8b0778521c19e621a6b60b3e1a4b">MapHR</a>,&<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w]);
- <a name="l04512"></a>04512 <span class="keywordflow">else</span> <a class="code" href="pumax_8c.html#a662cbf19367e08f6e376f8d1e3b765e0">ScaleImage</a>(&<a class="code" href="pumax_8c.html#a0aac8b0778521c19e621a6b60b3e1a4b">MapHR</a>,&<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w]);
- <a name="l04513"></a>04513 }
- <a name="l04514"></a>04514 XPutImage(display,pix,gc,<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].X,0,0,0,0,<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].w,<a class="code" href="pumax_8c.html#aa30070ce7cfd3502c505f83464d79510">MapLR</a>[w].h);
- <a name="l04515"></a>04515 <a class="code" href="pumax_8c.html#a7e589e7ff7d5125738a34547b5756253">IsoLines</a>(Cstrip,1);
- <a name="l04516"></a>04516 }
- <a name="l04517"></a>04517 }
- <a name="l04518"></a>04518 <span class="keywordflow">else</span>
- <a name="l04519"></a>04519 {
- <a name="l04520"></a>04520 XSetForeground(display,gc,BlackPix);
- <a name="l04521"></a>04521 XFillRectangle(display,pix,gc,0,0,WinXSize,InYSize);
- <a name="l04522"></a>04522 <a class="code" href="pumax_8c.html#a7e589e7ff7d5125738a34547b5756253">IsoLines</a>(Cstrip,1);
- <a name="l04523"></a>04523 }
- <a name="l04524"></a>04524 }
- <a name="l04525"></a>04525 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#a5cacfe29b73c60abfa48f1ab23b8d631">ISOHOV</a>)
- <a name="l04526"></a>04526 {
- <a name="l04527"></a>04527 <a class="code" href="pumax_8c.html#a84c2cc0435ae795bd3d15064ffea1501">IsoAreas</a>(Cstrip);
- <a name="l04528"></a>04528 }
- <a name="l04529"></a>04529
- <a name="l04530"></a>04530 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#ae41274f4b33dfd046884def7709aa887">ISOSH</a>)
- <a name="l04531"></a>04531 {
- <a name="l04532"></a>04532 <a class="code" href="pumax_8c.html#aed8ad522611a864b8abd8b245d68ceac">AmplitudePlot</a>();
- <a name="l04533"></a>04533 }
- <a name="l04534"></a>04534
- <a name="l04535"></a>04535 <span class="keywordflow">if</span> (Grid && PicType == <a class="code" href="pumax_8c.html#afc9e7bd37f3dc38ff12cdf5edb85a6d2">ISOCS</a>) <a class="code" href="pumax_8c.html#a76fadfb9ad5d4b5629b491009adc18ee">ShowGridCS</a>();
- <a name="l04536"></a>04536 <span class="keywordflow">if</span> (Grid && PicType == <a class="code" href="pumax_8c.html#ad3652a10b82037800a3efb555fb7833c">ISOLON</a>) <a class="code" href="pumax_8c.html#a48f79382d1404129c81412462243a5bd">ShowGridLonsi</a>();
- <a name="l04537"></a>04537 <span class="keywordflow">if</span> (Grid && PicType == <a class="code" href="pumax_8c.html#a5cacfe29b73c60abfa48f1ab23b8d631">ISOHOV</a> && MapPro[w] == 0) <a class="code" href="pumax_8c.html#a5a4a6887dea464a44006a936603a6a91">ShowGridHov</a>();
- <a name="l04538"></a>04538 <span class="keywordflow">if</span> (Grid && PicType == <a class="code" href="pumax_8c.html#a5cacfe29b73c60abfa48f1ab23b8d631">ISOHOV</a> && MapPro[w] == 1) <a class="code" href="pumax_8c.html#ae9322503c9ee71d24ed929c4433b81f0">ShowGridHovT</a>();
- <a name="l04539"></a>04539 <span class="keywordflow">if</span> (PicType == <a class="code" href="pumax_8c.html#a2f1d89ef346ef5189b556085f4553c4c">ISOHOR</a> && MapPro[w] == 1) <a class="code" href="pumax_8c.html#a8736525de26ffa57c6d3f302e0464e88">ShowGridPolar</a>();
- <a name="l04540"></a>04540 <span class="keywordflow">if</span> (Grid && PicType == <a class="code" href="pumax_8c.html#a2f1d89ef346ef5189b556085f4553c4c">ISOHOR</a> && MapPro[w] == 0) <a class="code" href="pumax_8c.html#a3c6f5ed7ed2b12beb152524aef7c8670">ShowGridCyl</a>();
- <a name="l04541"></a>04541 <span class="keywordflow">if</span> (Grid && PicType == <a class="code" href="pumax_8c.html#a35e0c3caf44835d5c02d3af3b975e21b">ISOCOL</a>) <a class="code" href="pumax_8c.html#a1605a005c902c708301c522cb78ed5d9">ShowGridCol</a>();
- <a name="l04542"></a>04542
- <a name="l04543"></a>04543 XCopyArea(display,pix,Win[w],gc,0,0,WinXSize,WinYSize,0,0);
- <a name="l04544"></a>04544 }
- <a name="l04545"></a>04545
- <a name="l04546"></a>04546
- <a name="l04547"></a>04547 <span class="comment">/* ==================================================================== */</span>
- <a name="l04548"></a>04548 <span class="comment">/* iguistep - this function is called from the model for every timestep */</span>
- <a name="l04549"></a>04549 <span class="comment">/* ==================================================================== */</span>
- <a name="l04550"></a>04550
- <a name="l04551"></a><a class="code" href="pumax_8c.html#adc182edd121e09db57e951fb245f2708">04551</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#adc182edd121e09db57e951fb245f2708">iguistep_</a>(<span class="keywordtype">float</span> pparcs[],<span class="keywordtype">int</span> kdatim[])
- <a name="l04552"></a>04552 {
- <a name="l04553"></a>04553 <span class="keywordtype">int</span> i,j,w; <span class="comment">// Loop indices</span>
- <a name="l04554"></a>04554 <span class="keyword">struct </span>timeval TimeVal; <span class="comment">// Retrieve time info</span>
- <a name="l04555"></a>04555
- <a name="l04556"></a>04556 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>) printf(<span class="stringliteral">"iguistep(%12.2e,%d-%d-%d)\n"</span>,
- <a name="l04557"></a>04557 pparcs[0],kdatim[0],kdatim[1],kdatim[2]);
- <a name="l04558"></a>04558 nstep++;
- <a name="l04559"></a>04559 memcpy(ndatim,kdatim,<span class="keyword">sizeof</span>(ndatim));
- <a name="l04560"></a>04560 DeltaTime = ndatim[4] - <a class="code" href="pumax_8c.html#a431f109cd0fda419267defc94d5e4926">LastMinute</a>;
- <a name="l04561"></a>04561 <span class="keywordflow">if</span> (DeltaTime < 0) DeltaTime += 60;
- <a name="l04562"></a>04562 <span class="keywordflow">if</span> (DeltaTime ==0) DeltaTime = 60;
- <a name="l04563"></a>04563 LastMinute = ndatim[4];
- <a name="l04564"></a>04564
- <a name="l04565"></a>04565 <span class="comment">// Compute frames per second every 20 calls</span>
- <a name="l04566"></a>04566
- <a name="l04567"></a>04567 gettimeofday(&TimeVal,NULL);
- <a name="l04568"></a>04568 LastSecond = <a class="code" href="pumax_8c.html#af22e8278c499183a077f11d9f2aa1922">ThisSecond</a>;
- <a name="l04569"></a>04569 ThisSecond = TimeVal.tv_sec;
- <a name="l04570"></a>04570
- <a name="l04571"></a>04571 <span class="keywordflow">if</span> (SecEvent = ThisSecond > LastSecond)
- <a name="l04572"></a>04572 {
- <a name="l04573"></a>04573 fps = nstep - <a class="code" href="pumax_8c.html#af0d7de5b658838770aedc6e81c2bfbba">LastStep</a>;
- <a name="l04574"></a>04574 LastStep = <a class="code" href="pumax_8c.html#a354c90bb46e1789fe52c4759474c2c89">nstep</a>;
- <a name="l04575"></a>04575 rmui = fps / <a class="code" href="pumax_8c.html#abbe54d9d31d45c4bf9b3881ab71b3d9d">rmuf</a>;
- <a name="l04576"></a>04576 <span class="keywordflow">if</span> (rmui < 1) rmui = 1;
- <a name="l04577"></a>04577 }
- <a name="l04578"></a>04578
- <a name="l04579"></a>04579 SkipFreq = 1 + fps / 30; <span class="comment">// Reduce plot rate on fast cpu's</span>
- <a name="l04580"></a>04580 <span class="keywordflow">if</span> (SkipFreq < 0 || SkipFreq > 10) SkipFreq = 0;
- <a name="l04581"></a>04581
- <a name="l04582"></a>04582 <span class="keywordflow">for</span> (w=0 ; w < <a class="code" href="pumax_8c.html#a2364498cd60ebd2201eeef32ce76e882">NumWin</a> ; ++w)
- <a name="l04583"></a>04583 {
- <a name="l04584"></a>04584 <span class="keywordflow">for</span> (j=0 ; j < <a class="code" href="pumax_8c.html#a66a0f3add0dee72c7f3811b88249a9b6">NumArrays</a> ; ++j)
- <a name="l04585"></a>04585 {
- <a name="l04586"></a>04586 <span class="keywordflow">if</span> (!strcmp(<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].array_name,<a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[j].Name))
- <a name="l04587"></a>04587 {
- <a name="l04588"></a>04588 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[j].Flag || RedrawFlag[w])
- <a name="l04589"></a>04589 <a class="code" href="pumax_8c.html#a6d3107848ccc42cc33820aad454e7fcb">iso</a>(w,<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].Plot,<a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[j].Data,<a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[j].DimX,<a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[j].DimY,
- <a name="l04590"></a>04590 <a class="code" href="pumax_8c.html#aa0260a08bcef20dcd8166c713c0bd381">Array</a>[j].DimZ,<a class="code" href="pumax_8c.html#a4f22d34c7ff93ae8a224a49744142661">WinAtt</a>[w].Palette);
- <a name="l04591"></a>04591 }
- <a name="l04592"></a>04592 }
- <a name="l04593"></a>04593 }
- <a name="l04594"></a>04594
- <a name="l04595"></a>04595 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#a4444b7b37748213e596d8d51dfdb3315">Parcs</a> ; ++i) <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[i].Val = pparcs[i];
- <a name="l04596"></a>04596 <a class="code" href="pumax_8c.html#acf33d3bfa71c46444f4f80e09ee4b9c6">ShowStep</a>();
- <a name="l04597"></a>04597 <a class="code" href="pumax_8c.html#a556605526426c716c92badd69589728a">ShowParcs</a>();
- <a name="l04598"></a>04598 <a class="code" href="pumax_8c.html#a5d7b22836449266ba8bd29a5f83e3c2b">HandleEvents</a>();
- <a name="l04599"></a>04599 <span class="keywordflow">if</span> (XCheckTypedWindowEvent(display,Cow,Expose,&CowEvent))
- <a name="l04600"></a>04600 <a class="code" href="pumax_8c.html#a41f77efa657ce06e158034152384bf2e">RedrawControlWindow</a>();
- <a name="l04601"></a>04601 <span class="keywordflow">for</span> (i=0 ; i < <a class="code" href="pumax_8c.html#a4444b7b37748213e596d8d51dfdb3315">Parcs</a> ; ++i) pparcs[i] = <a class="code" href="pumax_8c.html#a1ff2b68fd3766107233f373cca6fd2ef">Parc</a>[i].Val;
- <a name="l04602"></a>04602
- <a name="l04603"></a>04603 XSync(display,1);
- <a name="l04604"></a>04604 <span class="keywordflow">if</span> (Shutdown && MRpid < 1) <a class="code" href="pumax_8c.html#aeddd52f215d48c55293dfbc55156c780">SaveConfig</a>();
- <a name="l04605"></a>04605 <span class="keywordflow">if</span> (<a class="code" href="pumax_8c.html#a923774364cedbc16baa0bc05e9be136c">Debug</a>) printf(<span class="stringliteral">"iguistep returns %d\n"</span>,Shutdown);
- <a name="l04606"></a>04606 <span class="keywordflow">return</span> <a class="code" href="pumax_8c.html#ab21d9f37528b86a902a6729dd95ac59c">Shutdown</a>;
- <a name="l04607"></a>04607 }
- <a name="l04608"></a>04608
- <a name="l04609"></a><a class="code" href="pumax_8c.html#a495f2e0742e95d86d37335ea01a248a1">04609</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a495f2e0742e95d86d37335ea01a248a1">nresources_</a>(<span class="keywordtype">double</span> *ut, <span class="keywordtype">double</span> *st, <span class="keywordtype">long</span> *mem, <span class="keywordtype">long</span> *par, <span class="keywordtype">long</span> *paf,
- <a name="l04610"></a>04610 <span class="keywordtype">long</span> *swa, <span class="keywordtype">long</span> *dr, <span class="keywordtype">long</span> *dw)
- <a name="l04611"></a>04611 {
- <a name="l04612"></a>04612 <span class="keyword">struct </span>rusage ru;
- <a name="l04613"></a>04613 getrusage(RUSAGE_SELF,&ru);
- <a name="l04614"></a>04614 *ut = ru.ru_utime.tv_sec + 0.000001 * ru.ru_utime.tv_usec;
- <a name="l04615"></a>04615 *st = ru.ru_stime.tv_sec + 0.000001 * ru.ru_stime.tv_usec;
- <a name="l04616"></a>04616 *mem = ru.ru_maxrss;
- <a name="l04617"></a>04617 *par = ru.ru_minflt;
- <a name="l04618"></a>04618 *paf = ru.ru_majflt;
- <a name="l04619"></a>04619 *swa = ru.ru_nswap;
- <a name="l04620"></a>04620 *dr = ru.ru_inblock;
- <a name="l04621"></a>04621 *dw = ru.ru_oublock;
- <a name="l04622"></a>04622 <span class="keywordflow">return</span> 1;
- <a name="l04623"></a>04623 }
- <a name="l04624"></a>04624
- <a name="l04625"></a>04625 <span class="comment">/* ------------------------------------------------ */</span>
- <a name="l04626"></a>04626 <span class="comment">/* Stub routines for Absoft Compiler and others, */</span>
- <a name="l04627"></a>04627 <span class="comment">/* which require, that FORTRAN callable C-functions */</span>
- <a name="l04628"></a>04628 <span class="comment">/* are written in uppercase letters only */</span>
- <a name="l04629"></a>04629 <span class="comment">/* ------------------------------------------------ */</span>
- <a name="l04630"></a>04630
- <a name="l04631"></a>04631
- <a name="l04632"></a><a class="code" href="pumax_8c.html#aa2c3ce5eee87810f607d037c142d4be0">04632</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#aa2c3ce5eee87810f607d037c142d4be0">INITGUI</a>(<span class="keywordtype">int</span> *model, <span class="keywordtype">int</span> *debug, <span class="keywordtype">int</span> *lats, <span class="keywordtype">int</span> *mrpid, <span class="keywordtype">int</span> *mrnum)
- <a name="l04633"></a>04633 {
- <a name="l04634"></a>04634 <a class="code" href="pumax_8c.html#a3112b5a95104da13f9d136d080a9571a">initgui_</a>(model,debug,lats,mrpid,mrnum);
- <a name="l04635"></a>04635 }
- <a name="l04636"></a>04636
- <a name="l04637"></a><a class="code" href="pumax_8c.html#a867be165f65572704f06ba921150544f">04637</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a867be165f65572704f06ba921150544f">GUICLOSE</a>(<span class="keywordtype">void</span>)
- <a name="l04638"></a>04638 {
- <a name="l04639"></a>04639 <a class="code" href="pumax_8c.html#a3e6d6484cbc802c71aa4d660b3e6298c">guiclose_</a>();
- <a name="l04640"></a>04640 }
- <a name="l04641"></a>04641
- <a name="l04642"></a><a class="code" href="pumax_8c.html#ae32337d64b01e9fef3951ac55a34c82d">04642</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#ae32337d64b01e9fef3951ac55a34c82d">IGUISTEP</a>(<span class="keywordtype">float</span> pparcs[], <span class="keywordtype">int</span> kdatim[])
- <a name="l04643"></a>04643 {
- <a name="l04644"></a>04644 <span class="keywordflow">return</span> <a class="code" href="pumax_8c.html#adc182edd121e09db57e951fb245f2708">iguistep_</a>(pparcs,kdatim);
- <a name="l04645"></a>04645 }
- <a name="l04646"></a>04646
- <a name="l04647"></a><a class="code" href="pumax_8c.html#a0397119cd5422233207fb351e546efea">04647</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a0397119cd5422233207fb351e546efea">GUIPUT</a>(<span class="keywordtype">char</span> *aname, <span class="keywordtype">float</span> *array, <span class="keywordtype">int</span> *dimx, <span class="keywordtype">int</span> *dimy, <span class="keywordtype">int</span> *dimz)
- <a name="l04648"></a>04648 {
- <a name="l04649"></a>04649 <a class="code" href="pumax_8c.html#a583096811c0b0b458ad353d0e09e75a0">guiput_</a>(aname, array, dimx, dimy, dimz);
- <a name="l04650"></a>04650 }
- <a name="l04651"></a>04651
- <a name="l04652"></a><a class="code" href="pumax_8c.html#a7856e9415ba484949a3cefeac70c1c8c">04652</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a7856e9415ba484949a3cefeac70c1c8c">NRESOURCES</a>(<span class="keywordtype">double</span> *ut, <span class="keywordtype">double</span> *st, <span class="keywordtype">long</span> *mem, <span class="keywordtype">long</span> *par, <span class="keywordtype">long</span> *paf,
- <a name="l04653"></a>04653 <span class="keywordtype">long</span> *swa, <span class="keywordtype">long</span> *dr, <span class="keywordtype">long</span> *dw)
- <a name="l04654"></a>04654 {
- <a name="l04655"></a>04655 <span class="keywordflow">return</span> <a class="code" href="pumax_8c.html#a495f2e0742e95d86d37335ea01a248a1">nresources_</a>(ut,st,mem,par,paf,swa,dr,dw);
- <a name="l04656"></a>04656 }
- <a name="l04657"></a>04657
- <a name="l04658"></a>04658 <span class="comment">/* ------------------------------------------------ */</span>
- <a name="l04659"></a>04659 <span class="comment">/* Stub routines for IBM Compiler and others, */</span>
- <a name="l04660"></a>04660 <span class="comment">/* which require, that FORTRAN callable C-functions */</span>
- <a name="l04661"></a>04661 <span class="comment">/* are written in lowercase without underscore */</span>
- <a name="l04662"></a>04662 <span class="comment">/* ------------------------------------------------ */</span>
- <a name="l04663"></a>04663
- <a name="l04664"></a>04664
- <a name="l04665"></a><a class="code" href="pumax_8c.html#a1de39836b6c983abd5014eca3b58fb6b">04665</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a1de39836b6c983abd5014eca3b58fb6b">initgui</a>(<span class="keywordtype">int</span> *model, <span class="keywordtype">int</span> *debug, <span class="keywordtype">int</span> *lats, <span class="keywordtype">int</span> *mrpid, <span class="keywordtype">int</span> *mrnum)
- <a name="l04666"></a>04666 {
- <a name="l04667"></a>04667 <a class="code" href="pumax_8c.html#a3112b5a95104da13f9d136d080a9571a">initgui_</a>(model,debug,lats,mrpid,mrnum);
- <a name="l04668"></a>04668 }
- <a name="l04669"></a>04669
- <a name="l04670"></a><a class="code" href="pumax_8c.html#a5bcccf3b585aabc714dbb0e554817e11">04670</a> <span class="keywordtype">void</span> <a class="code" href="pumax_8c.html#a5bcccf3b585aabc714dbb0e554817e11">guiclose</a>(<span class="keywordtype">void</span>)
- <a name="l04671"></a>04671 {
- <a name="l04672"></a>04672 <a class="code" href="pumax_8c.html#a3e6d6484cbc802c71aa4d660b3e6298c">guiclose_</a>();
- <a name="l04673"></a>04673 }
- <a name="l04674"></a>04674
- <a name="l04675"></a><a class="code" href="pumax_8c.html#a5379e44b382c3d382ad16a9b37d671bc">04675</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a5379e44b382c3d382ad16a9b37d671bc">iguistep</a>(<span class="keywordtype">float</span> pparcs[], <span class="keywordtype">int</span> kdatim[])
- <a name="l04676"></a>04676 {
- <a name="l04677"></a>04677 <span class="keywordflow">return</span> <a class="code" href="pumax_8c.html#adc182edd121e09db57e951fb245f2708">iguistep_</a>(pparcs,kdatim);
- <a name="l04678"></a>04678 }
- <a name="l04679"></a>04679
- <a name="l04680"></a><a class="code" href="pumax_8c.html#a1adce4616e171ccfe8ad9f68bc10cdd2">04680</a> <span class="keywordtype">void</span> <a class="code" href="guimod__stub_8f90.html#a246c916d08a954310ea15d64816db13b">guiput</a>(<span class="keywordtype">char</span> *aname, <span class="keywordtype">float</span> *array, <span class="keywordtype">int</span> *dimx, <span class="keywordtype">int</span> *dimy, <span class="keywordtype">int</span> *dimz)
- <a name="l04681"></a>04681 {
- <a name="l04682"></a>04682 <a class="code" href="pumax_8c.html#a583096811c0b0b458ad353d0e09e75a0">guiput_</a>(aname, array, dimx, dimy, dimz);
- <a name="l04683"></a>04683 }
- <a name="l04684"></a>04684
- <a name="l04685"></a><a class="code" href="pumax_8c.html#a2d3f1fbf60f69e64a1d803256c837890">04685</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a2d3f1fbf60f69e64a1d803256c837890">iguinan_</a>(<span class="keywordtype">double</span> *p)
- <a name="l04686"></a>04686 {
- <a name="l04687"></a>04687 <span class="keywordflow">return</span> isnan(*p);
- <a name="l04688"></a>04688 }
- <a name="l04689"></a>04689
- <a name="l04690"></a><a class="code" href="pumax_8c.html#a7e885dd959a1c4e56017782911c1f796">04690</a> <span class="keywordtype">int</span> <a class="code" href="pumax_8c.html#a7e885dd959a1c4e56017782911c1f796">nresources</a>(<span class="keywordtype">double</span> *ut, <span class="keywordtype">double</span> *st, <span class="keywordtype">long</span> *mem, <span class="keywordtype">long</span> *par, <span class="keywordtype">long</span> *paf,
- <a name="l04691"></a>04691 <span class="keywordtype">long</span> *swa, <span class="keywordtype">long</span> *dr, <span class="keywordtype">long</span> *dw)
- <a name="l04692"></a>04692 {
- <a name="l04693"></a>04693 <span class="keywordflow">return</span> <a class="code" href="pumax_8c.html#a495f2e0742e95d86d37335ea01a248a1">nresources_</a>(ut,st,mem,par,paf,swa,dr,dw);
- <a name="l04694"></a>04694 }
- </pre></div></div>
- </div>
- <div id="nav-path" class="navpath">
- <ul>
- <li class="navelem"><a class="el" href="pumax_8c.html">pumax.c</a> </li>
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Defines</a></div>
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
- <li class="footer">Generated on Wed Sep 21 2011 12:35:46 for PUMA by
- <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
- </ul>
- </div>
- </body>
- </html>
|