GDIPlus.au3 292 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576
  1. #include-once
  2. #include "GDIPlusConstants.au3"
  3. #include "StructureConstants.au3"
  4. #include "WinAPICom.au3"
  5. #include "WinAPIConv.au3"
  6. #include "WinAPIGdi.au3"
  7. #include "WinAPIHObj.au3"
  8. #include "WinAPIIcons.au3"
  9. ; #INDEX# =======================================================================================================================
  10. ; Title .........: GDIPlus
  11. ; AutoIt Version : 3.3.14.5
  12. ; Language ......: English
  13. ; Description ...: Functions that assist with Microsoft Windows GDI+ management.
  14. ; It enables applications to use graphics and formatted text on both the video display and the printer.
  15. ; Applications based on the Microsoft Win32 API do not access graphics hardware directly.
  16. ; Instead, GDI+ interacts with device drivers on behalf of applications.
  17. ; GDI+ can be used in all Windows-based applications.
  18. ; GDI+ is new technology that is included in Windows XP and the Windows Server 2003.
  19. ; Author ........: Paul Campbell (PaulIA), rover, smashly, monoceres, Malkey, Authenticity
  20. ; Modified ......: Gary Frost, UEZ, Eukalyptus, jpm
  21. ; Dll ...........: GDIPlus.dll
  22. ; ===============================================================================================================================
  23. ; #VARIABLES# ===================================================================================================================
  24. Global $__g_hGDIPBrush = 0
  25. Global $__g_hGDIPDll = 0
  26. Global $__g_hGDIPPen = 0
  27. Global $__g_iGDIPRef = 0
  28. Global $__g_iGDIPToken = 0
  29. Global $__g_bGDIP_V1_0 = True
  30. ; ===============================================================================================================================
  31. ; #CURRENT# =====================================================================================================================
  32. ; _GDIPlus_ArrowCapCreate
  33. ; _GDIPlus_ArrowCapDispose
  34. ; _GDIPlus_ArrowCapGetFillState
  35. ; _GDIPlus_ArrowCapGetHeight
  36. ; _GDIPlus_ArrowCapGetMiddleInset
  37. ; _GDIPlus_ArrowCapGetWidth
  38. ; _GDIPlus_ArrowCapSetFillState
  39. ; _GDIPlus_ArrowCapSetHeight
  40. ; _GDIPlus_ArrowCapSetMiddleInset
  41. ; _GDIPlus_ArrowCapSetWidth
  42. ; _GDIPlus_BitmapCloneArea
  43. ; _GDIPlus_BitmapCreateDIBFromBitmap
  44. ; _GDIPlus_BitmapCreateFromFile
  45. ; _GDIPlus_BitmapCreateFromGraphics
  46. ; _GDIPlus_BitmapCreateFromHBITMAP
  47. ; _GDIPlus_BitmapCreateFromHICON
  48. ; _GDIPlus_BitmapCreateFromHICON32
  49. ; _GDIPlus_BitmapCreateFromMemory
  50. ; _GDIPlus_BitmapCreateFromResource
  51. ; _GDIPlus_BitmapCreateFromScan0
  52. ; _GDIPlus_BitmapCreateFromStream
  53. ; _GDIPlus_BitmapCreateHBITMAPFromBitmap
  54. ; _GDIPlus_BitmapDispose
  55. ; _GDIPlus_BitmapGetPixel
  56. ; _GDIPlus_BitmapLockBits
  57. ; _GDIPlus_BitmapSetPixel
  58. ; _GDIPlus_BitmapUnlockBits
  59. ; _GDIPlus_BrushClone
  60. ; _GDIPlus_BrushCreateSolid
  61. ; _GDIPlus_BrushDispose
  62. ; _GDIPlus_BrushGetSolidColor
  63. ; _GDIPlus_BrushGetType
  64. ; _GDIPlus_BrushSetSolidColor
  65. ; _GDIPlus_ColorMatrixCreate
  66. ; _GDIPlus_ColorMatrixCreateGrayScale
  67. ; _GDIPlus_ColorMatrixCreateNegative
  68. ; _GDIPlus_ColorMatrixCreateSaturation
  69. ; _GDIPlus_ColorMatrixCreateScale
  70. ; _GDIPlus_ColorMatrixCreateTranslate
  71. ; _GDIPlus_CustomLineCapClone
  72. ; _GDIPlus_CustomLineCapCreate
  73. ; _GDIPlus_CustomLineCapDispose
  74. ; _GDIPlus_CustomLineCapGetStrokeCaps
  75. ; _GDIPlus_CustomLineCapSetStrokeCaps
  76. ; _GDIPlus_Decoders
  77. ; _GDIPlus_DecodersGetCount
  78. ; _GDIPlus_DecodersGetSize
  79. ; _GDIPlus_DrawImagePoints
  80. ; _GDIPlus_Encoders
  81. ; _GDIPlus_EncodersGetCLSID
  82. ; _GDIPlus_EncodersGetCount
  83. ; _GDIPlus_EncodersGetParamList
  84. ; _GDIPlus_EncodersGetParamListSize
  85. ; _GDIPlus_EncodersGetSize
  86. ; _GDIPlus_FontCreate
  87. ; _GDIPlus_FontDispose
  88. ; _GDIPlus_FontFamilyCreate
  89. ; _GDIPlus_FontFamilyCreateFromCollection
  90. ; _GDIPlus_FontFamilyDispose
  91. ; _GDIPlus_FontFamilyGetCellAscent
  92. ; _GDIPlus_FontFamilyGetCellDescent
  93. ; _GDIPlus_FontFamilyGetEmHeight
  94. ; _GDIPlus_FontFamilyGetLineSpacing
  95. ; _GDIPlus_FontPrivateAddFont
  96. ; _GDIPlus_FontPrivateAddMemoryFont
  97. ; _GDIPlus_FontPrivateCollectionDispose
  98. ; _GDIPlus_FontPrivateCreateCollection
  99. ; _GDIPlus_FontGetHeight
  100. ; _GDIPlus_GraphicsClear
  101. ; _GDIPlus_GraphicsCreateFromHDC
  102. ; _GDIPlus_GraphicsCreateFromHWND
  103. ; _GDIPlus_GraphicsDispose
  104. ; _GDIPlus_GraphicsDrawArc
  105. ; _GDIPlus_GraphicsDrawBezier
  106. ; _GDIPlus_GraphicsDrawClosedCurve
  107. ; _GDIPlus_GraphicsDrawClosedCurve2
  108. ; _GDIPlus_GraphicsDrawCurve
  109. ; _GDIPlus_GraphicsDrawCurve2
  110. ; _GDIPlus_GraphicsDrawEllipse
  111. ; _GDIPlus_GraphicsDrawImage
  112. ; _GDIPlus_GraphicsDrawImagePointsRect
  113. ; _GDIPlus_GraphicsDrawImageRect
  114. ; _GDIPlus_GraphicsDrawImageRectRect
  115. ; _GDIPlus_GraphicsDrawLine
  116. ; _GDIPlus_GraphicsDrawPath
  117. ; _GDIPlus_GraphicsDrawPie
  118. ; _GDIPlus_GraphicsDrawPolygon
  119. ; _GDIPlus_GraphicsDrawRect
  120. ; _GDIPlus_GraphicsDrawString
  121. ; _GDIPlus_GraphicsDrawStringEx
  122. ; _GDIPlus_GraphicsFillClosedCurve
  123. ; _GDIPlus_GraphicsFillClosedCurve2
  124. ; _GDIPlus_GraphicsFillEllipse
  125. ; _GDIPlus_GraphicsFillPath
  126. ; _GDIPlus_GraphicsFillPie
  127. ; _GDIPlus_GraphicsFillPolygon
  128. ; _GDIPlus_GraphicsFillRect
  129. ; _GDIPlus_GraphicsFillRegion
  130. ; _GDIPlus_GraphicsGetCompositingMode
  131. ; _GDIPlus_GraphicsGetCompositingQuality
  132. ; _GDIPlus_GraphicsGetDC
  133. ; _GDIPlus_GraphicsGetInterpolationMode
  134. ; _GDIPlus_GraphicsGetSmoothingMode
  135. ; _GDIPlus_GraphicsGetTransform
  136. ; _GDIPlus_GraphicsMeasureCharacterRanges
  137. ; _GDIPlus_GraphicsMeasureString
  138. ; _GDIPlus_GraphicsReleaseDC
  139. ; _GDIPlus_GraphicsResetClip
  140. ; _GDIPlus_GraphicsResetTransform
  141. ; _GDIPlus_GraphicsRestore
  142. ; _GDIPlus_GraphicsRotateTransform
  143. ; _GDIPlus_GraphicsSave
  144. ; _GDIPlus_GraphicsScaleTransform
  145. ; _GDIPlus_GraphicsSetClipPath
  146. ; _GDIPlus_GraphicsSetClipRect
  147. ; _GDIPlus_GraphicsSetClipRegion
  148. ; _GDIPlus_GraphicsSetCompositingMode
  149. ; _GDIPlus_GraphicsSetCompositingQuality
  150. ; _GDIPlus_GraphicsSetInterpolationMode
  151. ; _GDIPlus_GraphicsSetPixelOffsetMode
  152. ; _GDIPlus_GraphicsSetSmoothingMode
  153. ; _GDIPlus_GraphicsSetTextRenderingHint
  154. ; _GDIPlus_GraphicsSetTransform
  155. ; _GDIPlus_GraphicsTransformPoints
  156. ; _GDIPlus_GraphicsTranslateTransform
  157. ; _GDIPlus_HatchBrushCreate
  158. ; _GDIPlus_HICONCreateFromBitmap
  159. ; _GDIPlus_ImageAttributesCreate
  160. ; _GDIPlus_ImageAttributesDispose
  161. ; _GDIPlus_ImageAttributesSetColorKeys
  162. ; _GDIPlus_ImageAttributesSetColorMatrix
  163. ; _GDIPlus_ImageDispose
  164. ; _GDIPlus_ImageGetDimension
  165. ; _GDIPlus_ImageGetFlags
  166. ; _GDIPlus_ImageGetGraphicsContext
  167. ; _GDIPlus_ImageGetHeight
  168. ; _GDIPlus_ImageGetHorizontalResolution
  169. ; _GDIPlus_ImageGetPixelFormat
  170. ; _GDIPlus_ImageGetRawFormat
  171. ; _GDIPlus_ImageGetThumbnail
  172. ; _GDIPlus_ImageGetType
  173. ; _GDIPlus_ImageGetVerticalResolution
  174. ; _GDIPlus_ImageGetWidth
  175. ; _GDIPlus_ImageLoadFromFile
  176. ; _GDIPlus_ImageLoadFromStream
  177. ; _GDIPlus_ImageRotateFlip
  178. ; _GDIPlus_ImageSaveToFile
  179. ; _GDIPlus_ImageSaveToFileEx
  180. ; _GDIPlus_ImageSaveToStream
  181. ; _GDIPlus_ImageScale
  182. ; _GDIPlus_ImageResize
  183. ; _GDIPlus_LineBrushCreate
  184. ; _GDIPlus_LineBrushCreateFromRect
  185. ; _GDIPlus_LineBrushCreateFromRectWithAngle
  186. ; _GDIPlus_LineBrushGetColors
  187. ; _GDIPlus_LineBrushGetRect
  188. ; _GDIPlus_LineBrushMultiplyTransform
  189. ; _GDIPlus_LineBrushResetTransform
  190. ; _GDIPlus_LineBrushSetBlend
  191. ; _GDIPlus_LineBrushSetColors
  192. ; _GDIPlus_LineBrushSetGammaCorrection
  193. ; _GDIPlus_LineBrushSetLinearBlend
  194. ; _GDIPlus_LineBrushSetPresetBlend
  195. ; _GDIPlus_LineBrushSetSigmaBlend
  196. ; _GDIPlus_LineBrushSetTransform
  197. ; _GDIPlus_MatrixCreate
  198. ; _GDIPlus_MatrixClone
  199. ; _GDIPlus_MatrixDispose
  200. ; _GDIPlus_MatrixGetElements
  201. ; _GDIPlus_MatrixInvert
  202. ; _GDIPlus_MatrixMultiply
  203. ; _GDIPlus_MatrixRotate
  204. ; _GDIPlus_MatrixScale
  205. ; _GDIPlus_MatrixSetElements
  206. ; _GDIPlus_MatrixShear
  207. ; _GDIPlus_MatrixTransformPoints
  208. ; _GDIPlus_MatrixTranslate
  209. ; _GDIPlus_ParamAdd
  210. ; _GDIPlus_ParamInit
  211. ; _GDIPlus_ParamSize
  212. ; _GDIPlus_PathAddArc
  213. ; _GDIPlus_PathAddBezier
  214. ; _GDIPlus_PathAddClosedCurve
  215. ; _GDIPlus_PathAddClosedCurve2
  216. ; _GDIPlus_PathAddCurve
  217. ; _GDIPlus_PathAddCurve2
  218. ; _GDIPlus_PathAddCurve3
  219. ; _GDIPlus_PathAddEllipse
  220. ; _GDIPlus_PathAddLine
  221. ; _GDIPlus_PathAddLine2
  222. ; _GDIPlus_PathAddPath
  223. ; _GDIPlus_PathAddPie
  224. ; _GDIPlus_PathAddPolygon
  225. ; _GDIPlus_PathAddRectangle
  226. ; _GDIPlus_PathAddString
  227. ; _GDIPlus_PathBrushCreate
  228. ; _GDIPlus_PathBrushCreateFromPath
  229. ; _GDIPlus_PathBrushGetCenterPoint
  230. ; _GDIPlus_PathBrushGetFocusScales
  231. ; _GDIPlus_PathBrushGetPointCount
  232. ; _GDIPlus_PathBrushGetRect
  233. ; _GDIPlus_PathBrushGetWrapMode
  234. ; _GDIPlus_PathBrushMultiplyTransform
  235. ; _GDIPlus_PathBrushResetTransform
  236. ; _GDIPlus_PathBrushSetBlend
  237. ; _GDIPlus_PathBrushSetCenterColor
  238. ; _GDIPlus_PathBrushSetCenterPoint
  239. ; _GDIPlus_PathBrushSetFocusScales
  240. ; _GDIPlus_PathBrushSetGammaCorrection
  241. ; _GDIPlus_PathBrushSetLinearBlend
  242. ; _GDIPlus_PathBrushSetPresetBlend
  243. ; _GDIPlus_PathBrushSetSigmaBlend
  244. ; _GDIPlus_PathBrushSetSurroundColor
  245. ; _GDIPlus_PathBrushSetSurroundColorsWithCount
  246. ; _GDIPlus_PathBrushSetTransform
  247. ; _GDIPlus_PathBrushSetWrapMode
  248. ; _GDIPlus_PathClone
  249. ; _GDIPlus_PathCloseFigure
  250. ; _GDIPlus_PathCreate
  251. ; _GDIPlus_PathCreate2
  252. ; _GDIPlus_PathDispose
  253. ; _GDIPlus_PathFlatten
  254. ; _GDIPlus_PathGetData
  255. ; _GDIPlus_PathGetFillMode
  256. ; _GDIPlus_PathGetLastPoint
  257. ; _GDIPlus_PathGetPointCount
  258. ; _GDIPlus_PathGetPoints
  259. ; _GDIPlus_PathGetWorldBounds
  260. ; _GDIPlus_PathIsOutlineVisiblePoint
  261. ; _GDIPlus_PathIsVisiblePoint
  262. ; _GDIPlus_PathIterCreate
  263. ; _GDIPlus_PathIterDispose
  264. ; _GDIPlus_PathIterGetSubpathCount
  265. ; _GDIPlus_PathIterNextMarkerPath
  266. ; _GDIPlus_PathIterNextSubpathPath
  267. ; _GDIPlus_PathIterRewind
  268. ; _GDIPlus_PathReset
  269. ; _GDIPlus_PathReverse
  270. ; _GDIPlus_PathSetFillMode
  271. ; _GDIPlus_PathSetMarker
  272. ; _GDIPlus_PathStartFigure
  273. ; _GDIPlus_PathTransform
  274. ; _GDIPlus_PathWarp
  275. ; _GDIPlus_PathWiden
  276. ; _GDIPlus_PathWindingModeOutline
  277. ; _GDIPlus_PenCreate
  278. ; _GDIPlus_PenCreate2
  279. ; _GDIPlus_PenDispose
  280. ; _GDIPlus_PenGetAlignment
  281. ; _GDIPlus_PenGetColor
  282. ; _GDIPlus_PenGetCustomEndCap
  283. ; _GDIPlus_PenGetDashCap
  284. ; _GDIPlus_PenGetDashStyle
  285. ; _GDIPlus_PenGetEndCap
  286. ; _GDIPlus_PenGetMiterLimit
  287. ; _GDIPlus_PenGetWidth
  288. ; _GDIPlus_PenSetAlignment
  289. ; _GDIPlus_PenSetColor
  290. ; _GDIPlus_PenSetCustomEndCap
  291. ; _GDIPlus_PenSetDashCap
  292. ; _GDIPlus_PenSetDashStyle
  293. ; _GDIPlus_PenSetEndCap
  294. ; _GDIPlus_PenSetLineCap
  295. ; _GDIPlus_PenSetLineJoin
  296. ; _GDIPlus_PenSetMiterLimit
  297. ; _GDIPlus_PenSetStartCap
  298. ; _GDIPlus_PenSetWidth
  299. ; _GDIPlus_RectFCreate
  300. ; _GDIPlus_RegionClone
  301. ; _GDIPlus_RegionCombinePath
  302. ; _GDIPlus_RegionCombineRect
  303. ; _GDIPlus_RegionCombineRegion
  304. ; _GDIPlus_RegionCreate
  305. ; _GDIPlus_RegionCreateFromPath
  306. ; _GDIPlus_RegionCreateFromRect
  307. ; _GDIPlus_RegionDispose
  308. ; _GDIPlus_RegionGetBounds
  309. ; _GDIPlus_RegionGetHRgn
  310. ; _GDIPlus_RegionTransform
  311. ; _GDIPlus_RegionTranslate
  312. ; _GDIPlus_Shutdown
  313. ; _GDIPlus_Startup
  314. ; _GDIPlus_StringFormatCreate
  315. ; _GDIPlus_StringFormatDispose
  316. ; _GDIPlus_StringFormatGetMeasurableCharacterRangeCount
  317. ; _GDIPlus_StringFormatSetAlign
  318. ; _GDIPlus_StringFormatSetLineAlign
  319. ; _GDIPlus_StringFormatSetMeasurableCharacterRanges
  320. ; _GDIPlus_TextureCreate
  321. ; _GDIPlus_TextureCreate2
  322. ; _GDIPlus_TextureCreateIA
  323. ;
  324. ; GDIPlus version 1.1. functions
  325. ;
  326. ; Bitmap APIs
  327. ; _GDIPlus_BitmapApplyEffect
  328. ; _GDIPlus_BitmapApplyEffectEx
  329. ; _GDIPlus_BitmapConvertFormat
  330. ; _GDIPlus_BitmapCreateApplyEffect
  331. ; _GDIPlus_BitmapCreateApplyEffectEx
  332. ; _GDIPlus_BitmapGetHistogram
  333. ; _GDIPlus_BitmapGetHistogramEx
  334. ; _GDIPlus_BitmapGetHistogramSize
  335. ; _GDIPlus_DrawImageFX
  336. ; _GDIPlus_DrawImageFXEx
  337. ; _GDIPlus_PaletteInitialize
  338. ;
  339. ; _GDIPlus_EffectCreate
  340. ; _GDIPlus_EffectCreateBlur
  341. ; _GDIPlus_EffectCreateBrightnessContrast
  342. ; _GDIPlus_EffectCreateColorBalance
  343. ; _GDIPlus_EffectCreateColorCurve
  344. ; _GDIPlus_EffectCreateColorLUT
  345. ; _GDIPlus_EffectCreateColorMatrix
  346. ; _GDIPlus_EffectCreateHueSaturationLightness
  347. ; _GDIPlus_EffectCreateLevels
  348. ; _GDIPlus_EffectCreateRedEyeCorrection
  349. ; _GDIPlus_EffectCreateSharpen
  350. ; _GDIPlus_EffectCreateTint
  351. ; _GDIPlus_EffectDispose
  352. ; _GDIPlus_EffectGetParameters
  353. ; _GDIPlus_EffectSetParameters
  354. ;
  355. ; New functions
  356. ; _GDIPlus_BitmapSetResolution
  357. ; _GDIPlus_ImageAttributesSetRemapTable
  358. ; _GDIPlus_ImageAttributesSetThreshold
  359. ; _GDIPlus_ImageClone
  360. ; _GDIPlus_ImageGetFrameCount
  361. ; _GDIPlus_ImageGetPropertyIdList
  362. ; _GDIPlus_ImageGetPropertyItem
  363. ; _GDIPlus_ImageSaveAdd
  364. ; _GDIPlus_ImageSaveAddImage
  365. ; _GDIPlus_ImageSelectActiveFrame
  366. ; _GDIPlus_MatrixCreate2
  367. ; _GDIPlus_PenResetTransform
  368. ; _GDIPlus_PenRotateTransform
  369. ; _GDIPlus_PenScaleTransform
  370. ; _GDIPlus_PenSetCompound
  371. ; _GDIPlus_PenSetTransform
  372. ; _GDIPlus_RegionSetEmpty
  373. ; _GDIPlus_RegionSetInfinite
  374. ; ===============================================================================================================================
  375. ; #INTERNAL_USE_ONLY# ===========================================================================================================
  376. ; __GDIPlus_BrushDefCreate
  377. ; __GDIPlus_BrushDefDispose
  378. ; __GDIPlus_EffectGetParameterSize
  379. ; __GDIPlus_ExtractFileExt
  380. ; __GDIPlus_ImageGetPropertyCount
  381. ; __GDIPlus_ImageGetPropertyItemSize
  382. ; __GDIPlus_LastDelimiter
  383. ; __GDIPlus_PenDefCreate
  384. ; __GDIPlus_PenDefDispose
  385. ; ===============================================================================================================================
  386. ; #FUNCTION# ====================================================================================================================
  387. ; Author ........: Paul Campbell (PaulIA)
  388. ; Modified.......: Gary Frost
  389. ; ===============================================================================================================================
  390. Func _GDIPlus_ArrowCapCreate($fHeight, $fWidth, $bFilled = True)
  391. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateAdjustableArrowCap", "float", $fHeight, "float", $fWidth, "bool", $bFilled, "handle*", 0)
  392. If @error Then Return SetError(@error, @extended, 0)
  393. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  394. Return $aResult[4]
  395. EndFunc ;==>_GDIPlus_ArrowCapCreate
  396. ; #FUNCTION# ====================================================================================================================
  397. ; Author ........: Paul Campbell (PaulIA)
  398. ; Modified.......: Gary Frost
  399. ; ===============================================================================================================================
  400. Func _GDIPlus_ArrowCapDispose($hCap)
  401. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeleteCustomLineCap", "handle", $hCap)
  402. If @error Then Return SetError(@error, @extended, False)
  403. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  404. Return True
  405. EndFunc ;==>_GDIPlus_ArrowCapDispose
  406. ; #FUNCTION# ====================================================================================================================
  407. ; Author ........: Paul Campbell (PaulIA)
  408. ; Modified.......: Gary Frost
  409. ; ===============================================================================================================================
  410. Func _GDIPlus_ArrowCapGetFillState($hArrowCap)
  411. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetAdjustableArrowCapFillState", "handle", $hArrowCap, "bool*", 0)
  412. If @error Then Return SetError(@error, @extended, False)
  413. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  414. Return True
  415. EndFunc ;==>_GDIPlus_ArrowCapGetFillState
  416. ; #FUNCTION# ====================================================================================================================
  417. ; Author ........: Paul Campbell (PaulIA)
  418. ; Modified.......: Gary Frost
  419. ; ===============================================================================================================================
  420. Func _GDIPlus_ArrowCapGetHeight($hArrowCap)
  421. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetAdjustableArrowCapHeight", "handle", $hArrowCap, "float*", 0)
  422. If @error Then Return SetError(@error, @extended, 0)
  423. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  424. Return $aResult[2]
  425. EndFunc ;==>_GDIPlus_ArrowCapGetHeight
  426. ; #FUNCTION# ====================================================================================================================
  427. ; Author ........: Paul Campbell (PaulIA)
  428. ; Modified.......: Gary Frost
  429. ; ===============================================================================================================================
  430. Func _GDIPlus_ArrowCapGetMiddleInset($hArrowCap)
  431. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetAdjustableArrowCapMiddleInset", "handle", $hArrowCap, "float*", 0)
  432. If @error Then Return SetError(@error, @extended, 0)
  433. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  434. Return $aResult[2]
  435. EndFunc ;==>_GDIPlus_ArrowCapGetMiddleInset
  436. ; #FUNCTION# ====================================================================================================================
  437. ; Author ........: Paul Campbell (PaulIA)
  438. ; Modified.......: Gary Frost
  439. ; ===============================================================================================================================
  440. Func _GDIPlus_ArrowCapGetWidth($hArrowCap)
  441. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetAdjustableArrowCapWidth", "handle", $hArrowCap, "float*", 0)
  442. If @error Then Return SetError(@error, @extended, 0)
  443. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  444. Return $aResult[2]
  445. EndFunc ;==>_GDIPlus_ArrowCapGetWidth
  446. ; #FUNCTION# ====================================================================================================================
  447. ; Author ........: Paul Campbell (PaulIA)
  448. ; Modified.......: Gary Frost
  449. ; ===============================================================================================================================
  450. Func _GDIPlus_ArrowCapSetFillState($hArrowCap, $bFilled = True)
  451. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetAdjustableArrowCapFillState", "handle", $hArrowCap, "bool", $bFilled)
  452. If @error Then Return SetError(@error, @extended, False)
  453. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  454. Return True
  455. EndFunc ;==>_GDIPlus_ArrowCapSetFillState
  456. ; #FUNCTION# ====================================================================================================================
  457. ; Author ........: Paul Campbell (PaulIA)
  458. ; Modified.......: Gary Frost
  459. ; ===============================================================================================================================
  460. Func _GDIPlus_ArrowCapSetHeight($hArrowCap, $fHeight)
  461. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetAdjustableArrowCapHeight", "handle", $hArrowCap, "float", $fHeight)
  462. If @error Then Return SetError(@error, @extended, False)
  463. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  464. Return True
  465. EndFunc ;==>_GDIPlus_ArrowCapSetHeight
  466. ; #FUNCTION# ====================================================================================================================
  467. ; Author ........: Paul Campbell (PaulIA)
  468. ; Modified.......: Gary Frost
  469. ; ===============================================================================================================================
  470. Func _GDIPlus_ArrowCapSetMiddleInset($hArrowCap, $fInset)
  471. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetAdjustableArrowCapMiddleInset", "handle", $hArrowCap, "float", $fInset)
  472. If @error Then Return SetError(@error, @extended, False)
  473. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  474. Return True
  475. EndFunc ;==>_GDIPlus_ArrowCapSetMiddleInset
  476. ; #FUNCTION# ====================================================================================================================
  477. ; Author ........: Paul Campbell (PaulIA)
  478. ; Modified.......: Gary Frost
  479. ; ===============================================================================================================================
  480. Func _GDIPlus_ArrowCapSetWidth($hArrowCap, $fWidth)
  481. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetAdjustableArrowCapWidth", "handle", $hArrowCap, "float", $fWidth)
  482. If @error Then Return SetError(@error, @extended, False)
  483. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  484. Return True
  485. EndFunc ;==>_GDIPlus_ArrowCapSetWidth
  486. ; #FUNCTION# ====================================================================================================================
  487. ; Author ........: Paul Campbell (PaulIA)
  488. ; Modified.......: Gary Frost
  489. ; ===============================================================================================================================
  490. Func _GDIPlus_BitmapCloneArea($hBitmap, $nLeft, $nTop, $nWidth, $nHeight, $iFormat = 0x00021808)
  491. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCloneBitmapArea", "float", $nLeft, "float", $nTop, "float", $nWidth, "float", $nHeight, _
  492. "int", $iFormat, "handle", $hBitmap, "handle*", 0)
  493. If @error Then Return SetError(@error, @extended, 0)
  494. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  495. Return $aResult[7]
  496. EndFunc ;==>_GDIPlus_BitmapCloneArea
  497. ; #FUNCTION# ====================================================================================================================
  498. ; Author ........: UEZ
  499. ; Modified ......: jpm
  500. ; ===============================================================================================================================
  501. Func _GDIPlus_BitmapCreateDIBFromBitmap($hBitmap)
  502. Local $aRet = DllCall($__g_hGDIPDll, "uint", "GdipGetImageDimension", "handle", $hBitmap, "float*", 0, "float*", 0)
  503. If @error Or $aRet[0] Then Return SetError(@error + 10, $aRet[0], 0)
  504. Local $tData = _GDIPlus_BitmapLockBits($hBitmap, 0, 0, $aRet[2], $aRet[3], $GDIP_ILMREAD, $GDIP_PXF32ARGB)
  505. Local $pBits = DllStructGetData($tData, "Scan0")
  506. If Not $pBits Then Return 0
  507. Local $tBIHDR = DllStructCreate($tagBITMAPV5HEADER)
  508. DllStructSetData($tBIHDR, "bV5Size", DllStructGetSize($tBIHDR))
  509. DllStructSetData($tBIHDR, "bV5Width", $aRet[2])
  510. DllStructSetData($tBIHDR, "bV5Height", $aRet[3])
  511. DllStructSetData($tBIHDR, "bV5Planes", 1)
  512. DllStructSetData($tBIHDR, "bV5BitCount", 32)
  513. DllStructSetData($tBIHDR, "bV5Compression", 0) ; $BI_BITFIELDS = 3, $BI_RGB = 0, $BI_RLE8 = 1, $BI_RLE4 = 2, $RGBA = 0x41424752
  514. DllStructSetData($tBIHDR, "bV5SizeImage", $aRet[3] * DllStructGetData($tData, "Stride"))
  515. DllStructSetData($tBIHDR, "bV5AlphaMask", 0xFF000000)
  516. DllStructSetData($tBIHDR, "bV5RedMask", 0x00FF0000)
  517. DllStructSetData($tBIHDR, "bV5GreenMask", 0x0000FF00)
  518. DllStructSetData($tBIHDR, "bV5BlueMask", 0x000000FF)
  519. DllStructSetData($tBIHDR, "bV5CSType", 2) ; $LCS_WINDOWS_COLOR_SPACE = 2
  520. DllStructSetData($tBIHDR, "bV5Intent", 4) ; $LCS_GM_IMA = 4
  521. Local $hHBitmapv5 = DllCall("gdi32.dll", "ptr", "CreateDIBSection", "hwnd", 0, "struct*", $tBIHDR, "uint", 0, "ptr*", 0, "ptr", 0, "dword", 0)
  522. If Not @error And $hHBitmapv5[0] Then
  523. DllCall("gdi32.dll", "dword", "SetBitmapBits", "ptr", $hHBitmapv5[0], "dword", $aRet[2] * $aRet[3] * 4, "ptr", DllStructGetData($tData, "Scan0"))
  524. $hHBitmapv5 = $hHBitmapv5[0]
  525. Else
  526. $hHBitmapv5 = 0
  527. EndIf
  528. _GDIPlus_BitmapUnlockBits($hBitmap, $tData)
  529. $tData = 0
  530. $tBIHDR = 0
  531. Return $hHBitmapv5
  532. EndFunc ;==>_GDIPlus_BitmapCreateDIBFromBitmap
  533. ; #FUNCTION# ====================================================================================================================
  534. ; Author ........: Paul Campbell (PaulIA)
  535. ; Modified.......: Gary Frost
  536. ; ===============================================================================================================================
  537. Func _GDIPlus_BitmapCreateFromFile($sFileName)
  538. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateBitmapFromFile", "wstr", $sFileName, "handle*", 0)
  539. If @error Then Return SetError(@error, @extended, 0)
  540. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  541. Return $aResult[2]
  542. EndFunc ;==>_GDIPlus_BitmapCreateFromFile
  543. ; #FUNCTION# ====================================================================================================================
  544. ; Author ........: Paul Campbell (PaulIA)
  545. ; Modified.......: Gary Frost
  546. ; ===============================================================================================================================
  547. Func _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphics)
  548. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateBitmapFromGraphics", "int", $iWidth, "int", $iHeight, "handle", $hGraphics, _
  549. "handle*", 0)
  550. If @error Then Return SetError(@error, @extended, 0)
  551. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  552. Return $aResult[4]
  553. EndFunc ;==>_GDIPlus_BitmapCreateFromGraphics
  554. ; #FUNCTION# ====================================================================================================================
  555. ; Author ........: Paul Campbell (PaulIA)
  556. ; Modified.......: Gary Frost
  557. ; ===============================================================================================================================
  558. Func _GDIPlus_BitmapCreateFromHBITMAP($hBitmap, $hPal = 0)
  559. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateBitmapFromHBITMAP", "handle", $hBitmap, "handle", $hPal, "handle*", 0)
  560. If @error Then Return SetError(@error, @extended, 0)
  561. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  562. Return $aResult[3]
  563. EndFunc ;==>_GDIPlus_BitmapCreateFromHBITMAP
  564. ;==================================================================================================================================
  565. ; Author ........: UEZ
  566. ; Modified.......: progandy
  567. ;===================================================================================================================================
  568. Func _GDIPlus_BitmapCreateFromMemory($dImage, $bHBITMAP = False)
  569. If Not IsBinary($dImage) Then Return SetError(1, 0, 0)
  570. Local $aResult = 0
  571. Local Const $dMemBitmap = Binary($dImage) ;load image saved in variable (memory) and convert it to binary
  572. Local Const $iLen = BinaryLen($dMemBitmap) ;get binary length of the image
  573. Local Const $GMEM_MOVEABLE = 0x0002
  574. $aResult = DllCall("kernel32.dll", "handle", "GlobalAlloc", "uint", $GMEM_MOVEABLE, "ulong_ptr", $iLen) ;allocates movable memory ($GMEM_MOVEABLE = 0x0002)
  575. If @error Then Return SetError(4, 0, 0)
  576. Local Const $hData = $aResult[0]
  577. $aResult = DllCall("kernel32.dll", "ptr", "GlobalLock", "handle", $hData)
  578. If @error Then Return SetError(5, 0, 0)
  579. Local $tMem = DllStructCreate("byte[" & $iLen & "]", $aResult[0]) ;create struct
  580. DllStructSetData($tMem, 1, $dMemBitmap) ;fill struct with image data
  581. DllCall("kernel32.dll", "bool", "GlobalUnlock", "handle", $hData) ;decrements the lock count associated with a memory object that was allocated with GMEM_MOVEABLE
  582. If @error Then Return SetError(6, 0, 0)
  583. Local Const $hStream = _WinAPI_CreateStreamOnHGlobal($hData) ;creates a stream object that uses an HGLOBAL memory handle to store the stream contents
  584. If @error Then Return SetError(2, 0, 0)
  585. Local Const $hBitmap = _GDIPlus_BitmapCreateFromStream($hStream) ;creates a Bitmap object based on an IStream COM interface
  586. If @error Then Return SetError(3, 0, 0)
  587. DllCall("oleaut32.dll", "long", "DispCallFunc", "ptr", $hStream, "ulong_ptr", 8 * (1 + @AutoItX64), "uint", 4, "ushort", 23, "uint", 0, "ptr", 0, "ptr", 0, "str", "") ;release memory from $hStream to avoid memory leak
  588. If $bHBITMAP Then
  589. Local Const $hHBmp = _GDIPlus_BitmapCreateDIBFromBitmap($hBitmap) ;supports GDI transparent color format
  590. _GDIPlus_BitmapDispose($hBitmap)
  591. Return $hHBmp
  592. EndIf
  593. Return $hBitmap
  594. EndFunc ;==>_GDIPlus_BitmapCreateFromMemory
  595. ; #FUNCTION# ====================================================================================================================
  596. ; Author ........: Authenticity
  597. ; Modified.......: UEZ
  598. ; ===============================================================================================================================
  599. Func _GDIPlus_BitmapCreateFromResource($hInst, $vResourceName)
  600. Local $sType = "int"
  601. If IsString($vResourceName) Then $sType = "wstr"
  602. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateBitmapFromResource", "handle", $hInst, $sType, $vResourceName, "handle*", 0)
  603. If @error Then Return SetError(@error, @extended, 0)
  604. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  605. Return $aResult[3]
  606. EndFunc ;==>_GDIPlus_BitmapCreateFromResource
  607. ; #FUNCTION# ====================================================================================================================
  608. ; Author ........: Authenticity
  609. ; Modified.......: UEZ
  610. ; ===============================================================================================================================
  611. Func _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight, $iPixelFormat = $GDIP_PXF32ARGB, $iStride = 0, $pScan0 = 0)
  612. Local $aResult = DllCall($__g_hGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", $iStride, "int", $iPixelFormat, "struct*", $pScan0, "handle*", 0)
  613. If @error Then Return SetError(@error, @extended, 0)
  614. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  615. Return $aResult[6]
  616. EndFunc ;==>_GDIPlus_BitmapCreateFromScan0
  617. ; #FUNCTION# ====================================================================================================================
  618. ; Author ........: Authenticity
  619. ; Modified.......: UEZ
  620. ; ===============================================================================================================================
  621. Func _GDIPlus_BitmapCreateFromStream($pStream)
  622. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateBitmapFromStream", "ptr", $pStream, "handle*", 0)
  623. If @error Then Return SetError(@error, @extended, 0)
  624. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  625. Return $aResult[2]
  626. EndFunc ;==>_GDIPlus_BitmapCreateFromStream
  627. ; #FUNCTION# ====================================================================================================================
  628. ; Author ........: Paul Campbell (PaulIA)
  629. ; Modified.......: Gary Frost
  630. ; ===============================================================================================================================
  631. Func _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap, $iARGB = 0xFF000000)
  632. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateHBITMAPFromBitmap", "handle", $hBitmap, "handle*", 0, "dword", $iARGB)
  633. If @error Then Return SetError(@error, @extended, 0)
  634. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  635. Return $aResult[2]
  636. EndFunc ;==>_GDIPlus_BitmapCreateHBITMAPFromBitmap
  637. ; #FUNCTION# ====================================================================================================================
  638. ; Author ........: Paul Campbell (PaulIA)
  639. ; Modified.......: Gary Frost
  640. ; ===============================================================================================================================
  641. Func _GDIPlus_BitmapDispose($hBitmap)
  642. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDisposeImage", "handle", $hBitmap)
  643. If @error Then Return SetError(@error, @extended, False)
  644. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  645. Return True
  646. EndFunc ;==>_GDIPlus_BitmapDispose
  647. ; #FUNCTION# ====================================================================================================================
  648. ; Author ........: Authenticity
  649. ; Modified.......: Eukalyptus
  650. ; Example .......: No
  651. ; ===============================================================================================================================
  652. Func _GDIPlus_BitmapCreateFromHICON($hIcon)
  653. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateBitmapFromHICON", "handle", $hIcon, "handle*", 0)
  654. If @error Then Return SetError(@error, @extended, 0)
  655. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  656. Return $aResult[2]
  657. EndFunc ;==>_GDIPlus_BitmapCreateFromHICON
  658. ; #FUNCTION# ====================================================================================================================
  659. ; Author ........: Eukalyptus
  660. ; Modified.......:
  661. ; Example .......; No
  662. ; ===============================================================================================================================
  663. Func _GDIPlus_BitmapCreateFromHICON32($hIcon)
  664. Local $tSIZE = _WinAPI_GetIconDimension($hIcon)
  665. Local $iWidth = DllStructGetData($tSIZE, 'X')
  666. Local $iHeight = DllStructGetData($tSIZE, 'Y')
  667. If $iWidth <= 0 Or $iHeight <= 0 Then Return SetError(10, -1, 0)
  668. Local $tBITMAPINFO = DllStructCreate("dword Size;long Width;long Height;word Planes;word BitCount;dword Compression;dword SizeImage;long XPelsPerMeter;long YPelsPerMeter;dword ClrUsed;dword ClrImportant;dword RGBQuad")
  669. DllStructSetData($tBITMAPINFO, 'Size', DllStructGetSize($tBITMAPINFO) - 4)
  670. DllStructSetData($tBITMAPINFO, 'Width', $iWidth)
  671. DllStructSetData($tBITMAPINFO, 'Height', -$iHeight)
  672. DllStructSetData($tBITMAPINFO, 'Planes', 1)
  673. DllStructSetData($tBITMAPINFO, 'BitCount', 32)
  674. DllStructSetData($tBITMAPINFO, 'Compression', 0)
  675. DllStructSetData($tBITMAPINFO, 'SizeImage', 0)
  676. Local $hDC = _WinAPI_CreateCompatibleDC(0)
  677. Local $pBits
  678. Local $hBmp = _WinAPI_CreateDIBSection(0, $tBITMAPINFO, 0, $pBits)
  679. Local $hOrig = _WinAPI_SelectObject($hDC, $hBmp)
  680. _WinAPI_DrawIconEx($hDC, 0, 0, $hIcon, $iWidth, $iHeight)
  681. Local $hBitmapIcon = _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight, $GDIP_PXF32ARGB, $iWidth * 4, $pBits)
  682. Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight)
  683. Local $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap)
  684. _GDIPlus_GraphicsDrawImage($hContext, $hBitmapIcon, 0, 0)
  685. _GDIPlus_GraphicsDispose($hContext)
  686. _GDIPlus_BitmapDispose($hBitmapIcon)
  687. _WinAPI_SelectObject($hDC, $hOrig)
  688. _WinAPI_DeleteDC($hDC)
  689. _WinAPI_DeleteObject($hBmp)
  690. Return $hBitmap
  691. EndFunc ;==>_GDIPlus_BitmapCreateFromHICON32
  692. ; #FUNCTION# ====================================================================================================================
  693. ; Author ........: Authenticity
  694. ; Modified.......: UEZ
  695. ; ===============================================================================================================================
  696. Func _GDIPlus_BitmapGetPixel($hBitmap, $iX, $iY)
  697. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipBitmapGetPixel", "handle", $hBitmap, "int", $iX, "int", $iY, "uint*", 0)
  698. If @error Then Return SetError(@error, @extended, 0)
  699. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  700. Return $aResult[4]
  701. EndFunc ;==>_GDIPlus_BitmapGetPixel
  702. ; #FUNCTION# ====================================================================================================================
  703. ; Author ........: Paul Campbell (PaulIA)
  704. ; Modified.......: Gary Frost
  705. ; ===============================================================================================================================
  706. Func _GDIPlus_BitmapLockBits($hBitmap, $iLeft, $iTop, $iWidth, $iHeight, $iFlags = $GDIP_ILMREAD, $iFormat = $GDIP_PXF32RGB)
  707. Local $tData = DllStructCreate($tagGDIPBITMAPDATA)
  708. Local $tRECT = DllStructCreate($tagRECT)
  709. ; The RECT is initialized strange for this function. It wants the Left and
  710. ; Top members set as usual but instead of Right and Bottom also being
  711. ; coordinates they are expected to be the Width and Height sizes
  712. ; respectively.
  713. DllStructSetData($tRECT, "Left", $iLeft)
  714. DllStructSetData($tRECT, "Top", $iTop)
  715. DllStructSetData($tRECT, "Right", $iWidth)
  716. DllStructSetData($tRECT, "Bottom", $iHeight)
  717. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipBitmapLockBits", "handle", $hBitmap, "struct*", $tRECT, "uint", $iFlags, "int", $iFormat, "struct*", $tData)
  718. If @error Then Return SetError(@error, @extended, 0)
  719. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  720. Return $tData
  721. EndFunc ;==>_GDIPlus_BitmapLockBits
  722. ; #FUNCTION# ====================================================================================================================
  723. ; Author ........: Authenticity
  724. ; Modified.......: UEZ
  725. ; ===============================================================================================================================
  726. Func _GDIPlus_BitmapSetPixel($hBitmap, $iX, $iY, $iARGB)
  727. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipBitmapSetPixel", "handle", $hBitmap, "int", $iX, "int", $iY, "uint", $iARGB)
  728. If @error Then Return SetError(@error, @extended, False)
  729. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  730. Return True
  731. EndFunc ;==>_GDIPlus_BitmapSetPixel
  732. ; #FUNCTION# ====================================================================================================================
  733. ; Author ........: Authenticity
  734. ; Modified ......: Eukalyptus
  735. ; ===============================================================================================================================
  736. Func _GDIPlus_BitmapSetResolution($hBitmap, $fDpiX, $fDpiY)
  737. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipBitmapSetResolution", "handle", $hBitmap, "float", $fDpiX, "float", $fDpiY)
  738. If @error Then Return SetError(@error, @extended, False)
  739. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  740. Return True
  741. EndFunc ;==>_GDIPlus_BitmapSetResolution
  742. ; #FUNCTION# ====================================================================================================================
  743. ; Author ........: Paul Campbell (PaulIA)
  744. ; Modified.......: Gary Frost
  745. ; ===============================================================================================================================
  746. Func _GDIPlus_BitmapUnlockBits($hBitmap, $tBitmapData)
  747. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipBitmapUnlockBits", "handle", $hBitmap, "struct*", $tBitmapData)
  748. If @error Then Return SetError(@error, @extended, False)
  749. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  750. Return True
  751. EndFunc ;==>_GDIPlus_BitmapUnlockBits
  752. ; #FUNCTION# ====================================================================================================================
  753. ; Author ........: Paul Campbell (PaulIA)
  754. ; Modified.......: Gary Frost
  755. ; ===============================================================================================================================
  756. Func _GDIPlus_BrushClone($hBrush)
  757. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCloneBrush", "handle", $hBrush, "handle*", 0)
  758. If @error Then Return SetError(@error, @extended, 0)
  759. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  760. Return $aResult[2]
  761. EndFunc ;==>_GDIPlus_BrushClone
  762. ; #FUNCTION# ====================================================================================================================
  763. ; Author ........: Paul Campbell (PaulIA)
  764. ; Modified.......: Gary Frost
  765. ; ===============================================================================================================================
  766. Func _GDIPlus_BrushCreateSolid($iARGB = 0xFF000000)
  767. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateSolidFill", "int", $iARGB, "handle*", 0)
  768. If @error Then Return SetError(@error, @extended, 0)
  769. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  770. Return $aResult[2]
  771. EndFunc ;==>_GDIPlus_BrushCreateSolid
  772. ; #FUNCTION# ====================================================================================================================
  773. ; Author ........: Paul Campbell (PaulIA)
  774. ; Modified.......: Gary Frost
  775. ; ===============================================================================================================================
  776. Func _GDIPlus_BrushDispose($hBrush)
  777. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeleteBrush", "handle", $hBrush)
  778. If @error Then Return SetError(@error, @extended, False)
  779. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  780. Return True
  781. EndFunc ;==>_GDIPlus_BrushDispose
  782. ; #FUNCTION# ====================================================================================================================
  783. ; Author ........:
  784. ; Modified.......: smashly
  785. ; ===============================================================================================================================
  786. Func _GDIPlus_BrushGetSolidColor($hBrush)
  787. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetSolidFillColor", "handle", $hBrush, "dword*", 0)
  788. If @error Then Return SetError(@error, @extended, -1)
  789. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  790. Return $aResult[2]
  791. EndFunc ;==>_GDIPlus_BrushGetSolidColor
  792. ; #FUNCTION# ====================================================================================================================
  793. ; Author ........: Paul Campbell (PaulIA)
  794. ; Modified.......: Gary Frost
  795. ; ===============================================================================================================================
  796. Func _GDIPlus_BrushGetType($hBrush)
  797. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetBrushType", "handle", $hBrush, "int*", 0)
  798. If @error Then Return SetError(@error, @extended, -1)
  799. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  800. Return $aResult[2]
  801. EndFunc ;==>_GDIPlus_BrushGetType
  802. ; #FUNCTION# ====================================================================================================================
  803. ; Author ........:
  804. ; Modified.......: smashly
  805. ; ===============================================================================================================================
  806. Func _GDIPlus_BrushSetSolidColor($hBrush, $iARGB = 0xFF000000)
  807. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetSolidFillColor", "handle", $hBrush, "dword", $iARGB)
  808. If @error Then Return SetError(@error, @extended, False)
  809. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  810. Return True
  811. EndFunc ;==>_GDIPlus_BrushSetSolidColor
  812. ; #FUNCTION# ====================================================================================================================
  813. ; Author ........: Authenticity
  814. ; Modified.......: UEZ
  815. ; ===============================================================================================================================
  816. Func _GDIPlus_ColorMatrixCreate()
  817. Return _GDIPlus_ColorMatrixCreateScale(1, 1, 1, 1)
  818. EndFunc ;==>_GDIPlus_ColorMatrixCreate
  819. ; #FUNCTION# ====================================================================================================================
  820. ; Author ........: Authenticity
  821. ; Modified.......: UEZ
  822. ; ===============================================================================================================================
  823. Func _GDIPlus_ColorMatrixCreateGrayScale()
  824. Local $iI, $iJ, $tCM, $aLums[4] = [$GDIP_RLUM, $GDIP_GLUM, $GDIP_BLUM, 0]
  825. $tCM = DllStructCreate($tagGDIPCOLORMATRIX)
  826. For $iI = 0 To 3
  827. For $iJ = 1 To 3
  828. DllStructSetData($tCM, "m", $aLums[$iI], $iI * 5 + $iJ)
  829. Next
  830. Next
  831. DllStructSetData($tCM, "m", 1, 19)
  832. DllStructSetData($tCM, "m", 1, 25)
  833. Return $tCM
  834. EndFunc ;==>_GDIPlus_ColorMatrixCreateGrayScale
  835. ; #FUNCTION# ====================================================================================================================
  836. ; Author ........: Authenticity
  837. ; Modified.......: UEZ
  838. ; ===============================================================================================================================
  839. Func _GDIPlus_ColorMatrixCreateNegative()
  840. Local $iI, $tCM
  841. $tCM = _GDIPlus_ColorMatrixCreateScale(-1, -1, -1, 1)
  842. For $iI = 1 To 4
  843. DllStructSetData($tCM, "m", 1, 20 + $iI)
  844. Next
  845. Return $tCM
  846. EndFunc ;==>_GDIPlus_ColorMatrixCreateNegative
  847. ; #FUNCTION# ====================================================================================================================
  848. ; Author ........: Authenticity
  849. ; Modified.......: UEZ
  850. ; ===============================================================================================================================
  851. Func _GDIPlus_ColorMatrixCreateSaturation($fSat)
  852. Local $fSatComp, $tCM
  853. $tCM = DllStructCreate($tagGDIPCOLORMATRIX)
  854. $fSatComp = (1 - $fSat)
  855. DllStructSetData($tCM, "m", $fSatComp * $GDIP_RLUM + $fSat, 1)
  856. DllStructSetData($tCM, "m", $fSatComp * $GDIP_RLUM, 2)
  857. DllStructSetData($tCM, "m", $fSatComp * $GDIP_RLUM, 3)
  858. DllStructSetData($tCM, "m", $fSatComp * $GDIP_GLUM, 6)
  859. DllStructSetData($tCM, "m", $fSatComp * $GDIP_GLUM + $fSat, 7)
  860. DllStructSetData($tCM, "m", $fSatComp * $GDIP_GLUM, 8)
  861. DllStructSetData($tCM, "m", $fSatComp * $GDIP_BLUM, 11)
  862. DllStructSetData($tCM, "m", $fSatComp * $GDIP_BLUM, 12)
  863. DllStructSetData($tCM, "m", $fSatComp * $GDIP_BLUM + $fSat, 13)
  864. DllStructSetData($tCM, "m", 1, 19)
  865. DllStructSetData($tCM, "m", 1, 25)
  866. Return $tCM
  867. EndFunc ;==>_GDIPlus_ColorMatrixCreateSaturation
  868. ; #FUNCTION# ====================================================================================================================
  869. ; Author ........: Authenticity
  870. ; Modified.......: UEZ
  871. ; ===============================================================================================================================
  872. Func _GDIPlus_ColorMatrixCreateScale($fRed, $fGreen, $fBlue, $fAlpha = 1)
  873. Local $tCM
  874. $tCM = DllStructCreate($tagGDIPCOLORMATRIX)
  875. DllStructSetData($tCM, "m", $fRed, 1)
  876. DllStructSetData($tCM, "m", $fGreen, 7)
  877. DllStructSetData($tCM, "m", $fBlue, 13)
  878. DllStructSetData($tCM, "m", $fAlpha, 19)
  879. DllStructSetData($tCM, "m", 1, 25)
  880. Return $tCM
  881. EndFunc ;==>_GDIPlus_ColorMatrixCreateScale
  882. ; #FUNCTION# ====================================================================================================================
  883. ; Author ........: Authenticity
  884. ; Modified.......: UEZ
  885. ; ===============================================================================================================================
  886. Func _GDIPlus_ColorMatrixCreateTranslate($fRed, $fGreen, $fBlue, $fAlpha = 0)
  887. Local $iI, $tCM, $aFactors[4] = [$fRed, $fGreen, $fBlue, $fAlpha]
  888. $tCM = _GDIPlus_ColorMatrixCreate()
  889. For $iI = 0 To 3
  890. DllStructSetData($tCM, "m", $aFactors[$iI], 21 + $iI)
  891. Next
  892. Return $tCM
  893. EndFunc ;==>_GDIPlus_ColorMatrixCreateTranslate
  894. ; #FUNCTION# ====================================================================================================================
  895. ; Author ........: Authenticity
  896. ; Modified.......: UEZ
  897. ; ===============================================================================================================================
  898. Func _GDIPlus_CustomLineCapClone($hCustomLineCap)
  899. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCloneCustomLineCap", "handle", $hCustomLineCap, "handle*", 0)
  900. If @error Then Return SetError(@error, @extended, 0)
  901. If $aResult[0] Then SetError(10, $aResult[0], 0)
  902. Return $aResult[2]
  903. EndFunc ;==>_GDIPlus_CustomLineCapClone
  904. ; #FUNCTION# ====================================================================================================================
  905. ; Author ........: Authenticity
  906. ; Modified.......: UEZ
  907. ; ===============================================================================================================================
  908. Func _GDIPlus_CustomLineCapCreate($hPathFill, $hPathStroke, $iLineCap = 0, $nBaseInset = 0)
  909. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateCustomLineCap", "handle", $hPathFill, "handle", $hPathStroke, "int", $iLineCap, "float", $nBaseInset, "handle*", 0)
  910. If @error Then Return SetError(@error, @extended, 0)
  911. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  912. Return $aResult[5]
  913. EndFunc ;==>_GDIPlus_CustomLineCapCreate
  914. ; #FUNCTION# ====================================================================================================================
  915. ; Author ........: Paul Campbell (PaulIA)
  916. ; Modified.......: Gary Frost
  917. ; ===============================================================================================================================
  918. Func _GDIPlus_CustomLineCapDispose($hCap)
  919. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeleteCustomLineCap", "handle", $hCap)
  920. If @error Then Return SetError(@error, @extended, False)
  921. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  922. Return True
  923. EndFunc ;==>_GDIPlus_CustomLineCapDispose
  924. ; #FUNCTION# ====================================================================================================================
  925. ; Author ........: Authenticity
  926. ; Modified.......: UEZ
  927. ; Example .......; No
  928. ; ===============================================================================================================================
  929. Func _GDIPlus_CustomLineCapGetStrokeCaps($hCustomLineCap)
  930. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetCustomLineCapStrokeCaps", "hwnd", $hCustomLineCap, "ptr*", 0, "ptr*", 0)
  931. If @error Then Return SetError(@error, @extended, 0)
  932. If $aResult[0] Then SetError(10, $aResult[0], 0)
  933. Local $aCaps[2]
  934. $aCaps[0] = $aResult[2]
  935. $aCaps[1] = $aResult[3]
  936. Return $aCaps
  937. EndFunc ;==>_GDIPlus_CustomLineCapGetStrokeCaps
  938. ; #FUNCTION# ====================================================================================================================
  939. ; Author ........: Authenticity
  940. ; Modified.......: UEZ
  941. ; Example .......; No
  942. ; ===============================================================================================================================
  943. Func _GDIPlus_CustomLineCapSetStrokeCaps($hCustomLineCap, $iStartCap, $iEndCap)
  944. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetCustomLineCapStrokeCaps", "handle", $hCustomLineCap, "int", $iStartCap, "int", $iEndCap)
  945. If @error Then Return SetError(@error, @extended, False)
  946. If $aResult[0] Then SetError(10, $aResult[0], False)
  947. Return True
  948. EndFunc ;==>_GDIPlus_CustomLineCapSetStrokeCaps
  949. ; #FUNCTION# ====================================================================================================================
  950. ; Author ........: Paul Campbell (PaulIA)
  951. ; Modified.......: Gary Frost
  952. ; ===============================================================================================================================
  953. Func _GDIPlus_Decoders()
  954. Local $iCount = _GDIPlus_DecodersGetCount()
  955. Local $iSize = _GDIPlus_DecodersGetSize()
  956. Local $tBuffer = DllStructCreate("byte[" & $iSize & "]")
  957. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageDecoders", "uint", $iCount, "uint", $iSize, "struct*", $tBuffer)
  958. If @error Then Return SetError(@error, @extended, 0)
  959. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  960. Local $pBuffer = DllStructGetPtr($tBuffer)
  961. Local $tCodec, $aInfo[$iCount + 1][14]
  962. $aInfo[0][0] = $iCount
  963. For $iI = 1 To $iCount
  964. $tCodec = DllStructCreate($tagGDIPIMAGECODECINFO, $pBuffer)
  965. $aInfo[$iI][1] = _WinAPI_StringFromGUID(DllStructGetPtr($tCodec, "CLSID"))
  966. $aInfo[$iI][2] = _WinAPI_StringFromGUID(DllStructGetPtr($tCodec, "FormatID"))
  967. $aInfo[$iI][3] = _WinAPI_WideCharToMultiByte(DllStructGetData($tCodec, "CodecName"))
  968. $aInfo[$iI][4] = _WinAPI_WideCharToMultiByte(DllStructGetData($tCodec, "DllName"))
  969. $aInfo[$iI][5] = _WinAPI_WideCharToMultiByte(DllStructGetData($tCodec, "FormatDesc"))
  970. $aInfo[$iI][6] = _WinAPI_WideCharToMultiByte(DllStructGetData($tCodec, "FileExt"))
  971. $aInfo[$iI][7] = _WinAPI_WideCharToMultiByte(DllStructGetData($tCodec, "MimeType"))
  972. $aInfo[$iI][8] = DllStructGetData($tCodec, "Flags")
  973. $aInfo[$iI][9] = DllStructGetData($tCodec, "Version")
  974. $aInfo[$iI][10] = DllStructGetData($tCodec, "SigCount")
  975. $aInfo[$iI][11] = DllStructGetData($tCodec, "SigSize")
  976. $aInfo[$iI][12] = DllStructGetData($tCodec, "SigPattern")
  977. $aInfo[$iI][13] = DllStructGetData($tCodec, "SigMask")
  978. $pBuffer += DllStructGetSize($tCodec)
  979. Next
  980. Return $aInfo
  981. EndFunc ;==>_GDIPlus_Decoders
  982. ; #FUNCTION# ====================================================================================================================
  983. ; Author ........: Paul Campbell (PaulIA)
  984. ; Modified.......: Gary Frost
  985. ; ===============================================================================================================================
  986. Func _GDIPlus_DecodersGetCount()
  987. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageDecodersSize", "uint*", 0, "uint*", 0)
  988. If @error Then Return SetError(@error, @extended, -1)
  989. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  990. Return $aResult[1]
  991. EndFunc ;==>_GDIPlus_DecodersGetCount
  992. ; #FUNCTION# ====================================================================================================================
  993. ; Author ........: Paul Campbell (PaulIA)
  994. ; Modified.......: Gary Frost
  995. ; ===============================================================================================================================
  996. Func _GDIPlus_DecodersGetSize()
  997. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageDecodersSize", "uint*", 0, "uint*", 0)
  998. If @error Then Return SetError(@error, @extended, -1)
  999. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  1000. Return $aResult[2]
  1001. EndFunc ;==>_GDIPlus_DecodersGetSize
  1002. ; #FUNCTION# ====================================================================================================================
  1003. ; Author ........: Malkey
  1004. ; Modified.......:
  1005. ; ===============================================================================================================================
  1006. Func _GDIPlus_DrawImagePoints($hGraphic, $hImage, $nULX, $nULY, $nURX, $nURY, $nLLX, $nLLY, $iCount = 3)
  1007. Local $tPoint = DllStructCreate("float X;float Y;float X2;float Y2;float X3;float Y3")
  1008. DllStructSetData($tPoint, "X", $nULX)
  1009. DllStructSetData($tPoint, "Y", $nULY)
  1010. DllStructSetData($tPoint, "X2", $nURX)
  1011. DllStructSetData($tPoint, "Y2", $nURY)
  1012. DllStructSetData($tPoint, "X3", $nLLX)
  1013. DllStructSetData($tPoint, "Y3", $nLLY)
  1014. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawImagePoints", "handle", $hGraphic, "handle", $hImage, "struct*", $tPoint, "int", $iCount)
  1015. If @error Then Return SetError(@error, @extended, False)
  1016. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1017. Return True
  1018. EndFunc ;==>_GDIPlus_DrawImagePoints
  1019. ; #FUNCTION# ====================================================================================================================
  1020. ; Author ........: Paul Campbell (PaulIA)
  1021. ; Modified.......: Gary Frost
  1022. ; ===============================================================================================================================
  1023. Func _GDIPlus_Encoders()
  1024. Local $iCount = _GDIPlus_EncodersGetCount()
  1025. Local $iSize = _GDIPlus_EncodersGetSize()
  1026. Local $tBuffer = DllStructCreate("byte[" & $iSize & "]")
  1027. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageEncoders", "uint", $iCount, "uint", $iSize, "struct*", $tBuffer)
  1028. If @error Then Return SetError(@error, @extended, 0)
  1029. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1030. Local $pBuffer = DllStructGetPtr($tBuffer)
  1031. Local $tCodec, $aInfo[$iCount + 1][14]
  1032. $aInfo[0][0] = $iCount
  1033. For $iI = 1 To $iCount
  1034. $tCodec = DllStructCreate($tagGDIPIMAGECODECINFO, $pBuffer)
  1035. $aInfo[$iI][1] = _WinAPI_StringFromGUID(DllStructGetPtr($tCodec, "CLSID"))
  1036. $aInfo[$iI][2] = _WinAPI_StringFromGUID(DllStructGetPtr($tCodec, "FormatID"))
  1037. $aInfo[$iI][3] = _WinAPI_WideCharToMultiByte(DllStructGetData($tCodec, "CodecName"))
  1038. $aInfo[$iI][4] = _WinAPI_WideCharToMultiByte(DllStructGetData($tCodec, "DllName"))
  1039. $aInfo[$iI][5] = _WinAPI_WideCharToMultiByte(DllStructGetData($tCodec, "FormatDesc"))
  1040. $aInfo[$iI][6] = _WinAPI_WideCharToMultiByte(DllStructGetData($tCodec, "FileExt"))
  1041. $aInfo[$iI][7] = _WinAPI_WideCharToMultiByte(DllStructGetData($tCodec, "MimeType"))
  1042. $aInfo[$iI][8] = DllStructGetData($tCodec, "Flags")
  1043. $aInfo[$iI][9] = DllStructGetData($tCodec, "Version")
  1044. $aInfo[$iI][10] = DllStructGetData($tCodec, "SigCount")
  1045. $aInfo[$iI][11] = DllStructGetData($tCodec, "SigSize")
  1046. $aInfo[$iI][12] = DllStructGetData($tCodec, "SigPattern")
  1047. $aInfo[$iI][13] = DllStructGetData($tCodec, "SigMask")
  1048. $pBuffer += DllStructGetSize($tCodec)
  1049. Next
  1050. Return $aInfo
  1051. EndFunc ;==>_GDIPlus_Encoders
  1052. ; #FUNCTION# ====================================================================================================================
  1053. ; Author ........: Paul Campbell (PaulIA)
  1054. ; Modified.......:
  1055. ; ===============================================================================================================================
  1056. Func _GDIPlus_EncodersGetCLSID($sFileExtension)
  1057. Local $aEncoders = _GDIPlus_Encoders()
  1058. If @error Then Return SetError(@error, 0, "")
  1059. For $iI = 1 To $aEncoders[0][0]
  1060. If StringInStr($aEncoders[$iI][6], "*." & $sFileExtension) > 0 Then Return $aEncoders[$iI][1]
  1061. Next
  1062. Return SetError(-1, -1, "")
  1063. EndFunc ;==>_GDIPlus_EncodersGetCLSID
  1064. ; #FUNCTION# ====================================================================================================================
  1065. ; Author ........: Paul Campbell (PaulIA)
  1066. ; Modified.......: Gary Frost
  1067. ; ===============================================================================================================================
  1068. Func _GDIPlus_EncodersGetCount()
  1069. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageEncodersSize", "uint*", 0, "uint*", 0)
  1070. If @error Then Return SetError(@error, @extended, -1)
  1071. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  1072. Return $aResult[1]
  1073. EndFunc ;==>_GDIPlus_EncodersGetCount
  1074. ; #FUNCTION# ====================================================================================================================
  1075. ; Author ........: Paul Campbell (PaulIA)
  1076. ; Modified.......: Gary Frost, jpm
  1077. ; ===============================================================================================================================
  1078. Func _GDIPlus_EncodersGetParamList($hImage, $sEncoder)
  1079. Local $iSize = _GDIPlus_EncodersGetParamListSize($hImage, $sEncoder)
  1080. If @error Then Return SetError(@error + 10, @extended, 0)
  1081. Local $tGUID = _WinAPI_GUIDFromString($sEncoder)
  1082. Local $iRemainingSize = $iSize - 4 - _GDIPlus_ParamSize()
  1083. Local $tBuffer
  1084. If $iRemainingSize Then
  1085. $tBuffer = DllStructCreate("dword Count;" & $tagGDIPENCODERPARAM & ";byte [" & $iRemainingSize & "]")
  1086. Else
  1087. $tBuffer = DllStructCreate("dword Count;" & $tagGDIPENCODERPARAM)
  1088. EndIf
  1089. ;~ Local $tBuffer = DllStructCreate("dword Count;byte GUID[" & $iSize - 4 & "]")
  1090. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetEncoderParameterList", "handle", $hImage, "struct*", $tGUID, "uint", $iSize, "struct*", $tBuffer)
  1091. If @error Then Return SetError(@error, @extended, 0)
  1092. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1093. Return $tBuffer
  1094. EndFunc ;==>_GDIPlus_EncodersGetParamList
  1095. ; #FUNCTION# ====================================================================================================================
  1096. ; Author ........: Paul Campbell (PaulIA)
  1097. ; Modified.......: Gary Frost
  1098. ; ===============================================================================================================================
  1099. Func _GDIPlus_EncodersGetParamListSize($hImage, $sEncoder)
  1100. Local $tGUID = _WinAPI_GUIDFromString($sEncoder)
  1101. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetEncoderParameterListSize", "handle", $hImage, "struct*", $tGUID, "uint*", 0)
  1102. If @error Then Return SetError(@error, @extended, 0)
  1103. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1104. Return $aResult[3]
  1105. EndFunc ;==>_GDIPlus_EncodersGetParamListSize
  1106. ; #FUNCTION# ====================================================================================================================
  1107. ; Author ........: Paul Campbell (PaulIA)
  1108. ; Modified.......: Gary Frost
  1109. ; ===============================================================================================================================
  1110. Func _GDIPlus_EncodersGetSize()
  1111. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageEncodersSize", "uint*", 0, "uint*", 0)
  1112. If @error Then Return SetError(@error, @extended, -1)
  1113. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  1114. Return $aResult[2]
  1115. EndFunc ;==>_GDIPlus_EncodersGetSize
  1116. ; #FUNCTION# ====================================================================================================================
  1117. ; Author ........: Paul Campbell (PaulIA)
  1118. ; Modified.......: Gary Frost
  1119. ; ===============================================================================================================================
  1120. Func _GDIPlus_FontCreate($hFamily, $fSize, $iStyle = 0, $iUnit = 3)
  1121. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateFont", "handle", $hFamily, "float", $fSize, "int", $iStyle, "int", $iUnit, "handle*", 0)
  1122. If @error Then Return SetError(@error, @extended, 0)
  1123. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1124. Return $aResult[5]
  1125. EndFunc ;==>_GDIPlus_FontCreate
  1126. ; #FUNCTION# ====================================================================================================================
  1127. ; Author ........: Paul Campbell (PaulIA)
  1128. ; Modified.......: Gary Frost
  1129. ; ===============================================================================================================================
  1130. Func _GDIPlus_FontDispose($hFont)
  1131. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeleteFont", "handle", $hFont)
  1132. If @error Then Return SetError(@error, @extended, False)
  1133. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1134. Return True
  1135. EndFunc ;==>_GDIPlus_FontDispose
  1136. ; #FUNCTION# ====================================================================================================================
  1137. ; Author ........: Paul Campbell (PaulIA)
  1138. ; Modified.......: Gary Frost, Eukalyptus
  1139. ; ===============================================================================================================================
  1140. Func _GDIPlus_FontFamilyCreate($sFamily, $pCollection = 0)
  1141. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateFontFamilyFromName", "wstr", $sFamily, "ptr", $pCollection, "handle*", 0)
  1142. If @error Then Return SetError(@error, @extended, 0)
  1143. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1144. Return $aResult[3]
  1145. EndFunc ;==>_GDIPlus_FontFamilyCreate
  1146. ; #FUNCTION# ====================================================================================================================
  1147. ; Author ........: UEZ
  1148. ; Modified ......:
  1149. ; ===============================================================================================================================
  1150. Func _GDIPlus_FontFamilyCreateFromCollection($sFontName, $hFontCollection)
  1151. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateFontFamilyFromName", "wstr", $sFontName, "ptr", $hFontCollection, "ptr*", 0)
  1152. If @error Then Return SetError(@error, @extended, "")
  1153. If $aResult[0] Then Return SetError(10, $aResult[0], "")
  1154. Return $aResult[3]
  1155. EndFunc ;==>_GDIPlus_FontFamilyCreateFromCollection
  1156. ; #FUNCTION# ====================================================================================================================
  1157. ; Author ........: Paul Campbell (PaulIA)
  1158. ; Modified.......: Gary Frost
  1159. ; ===============================================================================================================================
  1160. Func _GDIPlus_FontFamilyDispose($hFamily)
  1161. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeleteFontFamily", "handle", $hFamily)
  1162. If @error Then Return SetError(@error, @extended, False)
  1163. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1164. Return True
  1165. EndFunc ;==>_GDIPlus_FontFamilyDispose
  1166. ; #FUNCTION# ====================================================================================================================
  1167. ; Author ........: Authenticity
  1168. ; Modified.......: Eukalyptus
  1169. ; ===============================================================================================================================
  1170. Func _GDIPlus_FontFamilyGetCellAscent($hFontFamily, $iStyle = 0)
  1171. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetCellAscent", "handle", $hFontFamily, "int", $iStyle, "ushort*", 0)
  1172. If @error Then Return SetError(@error, @extended, 0)
  1173. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1174. Return $aResult[3]
  1175. EndFunc ;==>_GDIPlus_FontFamilyGetCellAscent
  1176. ; #FUNCTION# ====================================================================================================================
  1177. ; Author ........: Authenticity
  1178. ; Modified.......: Eukalyptus
  1179. ; ===============================================================================================================================
  1180. Func _GDIPlus_FontFamilyGetCellDescent($hFontFamily, $iStyle = 0)
  1181. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetCellDescent", "handle", $hFontFamily, "int", $iStyle, "ushort*", 0)
  1182. If @error Then Return SetError(@error, @extended, 0)
  1183. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1184. Return $aResult[3]
  1185. EndFunc ;==>_GDIPlus_FontFamilyGetCellDescent
  1186. ; #FUNCTION# ====================================================================================================================
  1187. ; Author ........: Authenticity
  1188. ; Modified.......: Eukalyptus
  1189. ; ===============================================================================================================================
  1190. Func _GDIPlus_FontFamilyGetEmHeight($hFontFamily, $iStyle = 0)
  1191. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetEmHeight", "handle", $hFontFamily, "int", $iStyle, "ushort*", 0)
  1192. If @error Then Return SetError(@error, @extended, 0)
  1193. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1194. Return $aResult[3]
  1195. EndFunc ;==>_GDIPlus_FontFamilyGetEmHeight
  1196. ; #FUNCTION# ====================================================================================================================
  1197. ; Author ........: Authenticity
  1198. ; Modified.......: Eukalyptus
  1199. ; ===============================================================================================================================
  1200. Func _GDIPlus_FontFamilyGetLineSpacing($hFontFamily, $iStyle = 0)
  1201. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetLineSpacing", "handle", $hFontFamily, "int", $iStyle, "ushort*", 0)
  1202. If @error Then Return SetError(@error, @extended, 0)
  1203. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1204. Return $aResult[3]
  1205. EndFunc ;==>_GDIPlus_FontFamilyGetLineSpacing
  1206. ; #FUNCTION# ====================================================================================================================
  1207. ; Author ........: Authenticity
  1208. ; Modified.......: Eukalyptus
  1209. ; ===============================================================================================================================
  1210. Func _GDIPlus_FontGetHeight($hFont, $hGraphics)
  1211. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetFontHeight", "handle", $hFont, "handle", $hGraphics, "float*", 0)
  1212. If @error Then Return SetError(@error, @extended, 0)
  1213. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1214. Return $aResult[3]
  1215. EndFunc ;==>_GDIPlus_FontGetHeight
  1216. ; #FUNCTION# ====================================================================================================================
  1217. ; Author ........: UEZ
  1218. ; Modified ......:
  1219. ; ===============================================================================================================================
  1220. Func _GDIPlus_FontPrivateAddFont($hFontCollection, $sFontFile)
  1221. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipPrivateAddFontFile", "ptr", $hFontCollection, "wstr", $sFontFile)
  1222. If @error Then Return SetError(@error, @extended, False)
  1223. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1224. Return True
  1225. EndFunc ;==>_GDIPlus_FontPrivateAddFont
  1226. ; #FUNCTION# ====================================================================================================================
  1227. ; Author ........: UEZ
  1228. ; Modified ......:
  1229. ; ===============================================================================================================================
  1230. Func _GDIPlus_FontPrivateAddMemoryFont($hFontCollection, $tFont)
  1231. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipPrivateAddMemoryFont", "handle", $hFontCollection, "struct*", $tFont, "int", DllStructGetSize($tFont))
  1232. If @error Then Return SetError(@error, @extended, False)
  1233. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1234. Return True
  1235. EndFunc ;==>_GDIPlus_FontPrivateAddMemoryFont
  1236. ; #FUNCTION# ====================================================================================================================
  1237. ; Author ........: UEZ
  1238. ; Modified ......:
  1239. ; ===============================================================================================================================
  1240. Func _GDIPlus_FontPrivateCollectionDispose($hFontCollection)
  1241. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeletePrivateFontCollection", "handle*", $hFontCollection)
  1242. If @error Then Return SetError(@error, @extended, False)
  1243. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1244. Return True
  1245. EndFunc ;==>_GDIPlus_FontPrivateCollectionDispose
  1246. ; #FUNCTION# ====================================================================================================================
  1247. ; Author ........: UEZ
  1248. ; Modified ......:
  1249. ; ===============================================================================================================================
  1250. Func _GDIPlus_FontPrivateCreateCollection()
  1251. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipNewPrivateFontCollection", "ptr*", 0)
  1252. If @error Then Return SetError(@error, @extended, 0)
  1253. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1254. Return $aResult[1]
  1255. EndFunc ;==>_GDIPlus_FontPrivateCreateCollection
  1256. ; #FUNCTION# ====================================================================================================================
  1257. ; Author ........: Paul Campbell (PaulIA)
  1258. ; Modified.......: Gary Frost
  1259. ; ===============================================================================================================================
  1260. Func _GDIPlus_GraphicsClear($hGraphics, $iARGB = 0xFF000000)
  1261. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGraphicsClear", "handle", $hGraphics, "dword", $iARGB)
  1262. If @error Then Return SetError(@error, @extended, False)
  1263. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1264. Return True
  1265. EndFunc ;==>_GDIPlus_GraphicsClear
  1266. ; #FUNCTION# ====================================================================================================================
  1267. ; Author ........: Paul Campbell (PaulIA)
  1268. ; Modified.......: Gary Frost
  1269. ; ===============================================================================================================================
  1270. Func _GDIPlus_GraphicsCreateFromHDC($hDC)
  1271. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateFromHDC", "handle", $hDC, "handle*", 0)
  1272. If @error Then Return SetError(@error, @extended, 0)
  1273. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1274. Return $aResult[2]
  1275. EndFunc ;==>_GDIPlus_GraphicsCreateFromHDC
  1276. ; #FUNCTION# ====================================================================================================================
  1277. ; Author ........: Paul Campbell (PaulIA)
  1278. ; Modified.......: Gary Frost
  1279. ; ===============================================================================================================================
  1280. Func _GDIPlus_GraphicsCreateFromHWND($hWnd)
  1281. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateFromHWND", "hwnd", $hWnd, "handle*", 0)
  1282. If @error Then Return SetError(@error, @extended, 0)
  1283. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1284. Return $aResult[2]
  1285. EndFunc ;==>_GDIPlus_GraphicsCreateFromHWND
  1286. ; #FUNCTION# ====================================================================================================================
  1287. ; Author ........: Paul Campbell (PaulIA)
  1288. ; Modified.......: Gary Frost
  1289. ; ===============================================================================================================================
  1290. Func _GDIPlus_GraphicsDispose($hGraphics)
  1291. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeleteGraphics", "handle", $hGraphics)
  1292. If @error Then Return SetError(@error, @extended, False)
  1293. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1294. Return True
  1295. EndFunc ;==>_GDIPlus_GraphicsDispose
  1296. ; #FUNCTION# ====================================================================================================================
  1297. ; Author ........: Paul Campbell (PaulIA)
  1298. ; Modified.......: Gary Frost, UEZ, jpm
  1299. ; ===============================================================================================================================
  1300. Func _GDIPlus_GraphicsDrawArc($hGraphics, $nX, $nY, $nWidth, $nHeight, $fStartAngle, $fSweepAngle, $hPen = 0)
  1301. __GDIPlus_PenDefCreate($hPen)
  1302. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawArc", "handle", $hGraphics, "handle", $hPen, "float", $nX, "float", $nY, _
  1303. "float", $nWidth, "float", $nHeight, "float", $fStartAngle, "float", $fSweepAngle)
  1304. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  1305. If @error Then Return SetError(@error, @extended, False)
  1306. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1307. Return True
  1308. EndFunc ;==>_GDIPlus_GraphicsDrawArc
  1309. ; #FUNCTION# ====================================================================================================================
  1310. ; Author ........: Paul Campbell (PaulIA)
  1311. ; Modified.......: Gary Frost, UEZ, jpm
  1312. ; ===============================================================================================================================
  1313. Func _GDIPlus_GraphicsDrawBezier($hGraphics, $nX1, $nY1, $nX2, $nY2, $nX3, $nY3, $nX4, $nY4, $hPen = 0)
  1314. __GDIPlus_PenDefCreate($hPen)
  1315. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawBezier", "handle", $hGraphics, "handle", $hPen, "float", $nX1, "float", $nY1, _
  1316. "float", $nX2, "float", $nY2, "float", $nX3, "float", $nY3, "float", $nX4, "float", $nY4)
  1317. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  1318. If @error Then Return SetError(@error, @extended, False)
  1319. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1320. Return True
  1321. EndFunc ;==>_GDIPlus_GraphicsDrawBezier
  1322. ; #FUNCTION# ====================================================================================================================
  1323. ; Author ........: Paul Campbell (PaulIA)
  1324. ; Modified.......: Gary Frost, UEZ, jpm
  1325. ; ===============================================================================================================================
  1326. Func _GDIPlus_GraphicsDrawClosedCurve($hGraphics, $aPoints, $hPen = 0)
  1327. Local $iCount = $aPoints[0][0]
  1328. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  1329. For $iI = 1 To $iCount
  1330. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  1331. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  1332. Next
  1333. __GDIPlus_PenDefCreate($hPen)
  1334. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawClosedCurve", "handle", $hGraphics, "handle", $hPen, "struct*", $tPoints, "int", $iCount)
  1335. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  1336. If @error Then Return SetError(@error, @extended, False)
  1337. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1338. Return True
  1339. EndFunc ;==>_GDIPlus_GraphicsDrawClosedCurve
  1340. ; #FUNCTION# ====================================================================================================================
  1341. ; Author ........: Authenticity
  1342. ; Modified.......: UEZ
  1343. ; ===============================================================================================================================
  1344. Func _GDIPlus_GraphicsDrawClosedCurve2($hGraphics, $aPoints, $nTension, $hPen = 0)
  1345. Local $iI, $iCount, $tPoints, $aResult
  1346. __GDIPlus_PenDefCreate($hPen)
  1347. $iCount = $aPoints[0][0]
  1348. $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  1349. For $iI = 1 To $iCount
  1350. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  1351. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  1352. Next
  1353. $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawClosedCurve2", "handle", $hGraphics, "handle", $hPen, "struct*", $tPoints, "int", $iCount, "float", $nTension)
  1354. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  1355. If @error Then Return SetError(@error, @extended, False)
  1356. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1357. Return True
  1358. EndFunc ;==>_GDIPlus_GraphicsDrawClosedCurve2
  1359. ; #FUNCTION# ====================================================================================================================
  1360. ; Author ........: Paul Campbell (PaulIA)
  1361. ; Modified.......: Gary Frost, UEZ, jpm
  1362. ; ===============================================================================================================================
  1363. Func _GDIPlus_GraphicsDrawCurve($hGraphics, $aPoints, $hPen = 0)
  1364. Local $iCount = $aPoints[0][0]
  1365. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  1366. For $iI = 1 To $iCount
  1367. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  1368. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  1369. Next
  1370. __GDIPlus_PenDefCreate($hPen)
  1371. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawCurve", "handle", $hGraphics, "handle", $hPen, "struct*", $tPoints, "int", $iCount)
  1372. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  1373. If @error Then Return SetError(@error, @extended, False)
  1374. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1375. Return True
  1376. EndFunc ;==>_GDIPlus_GraphicsDrawCurve
  1377. ; #FUNCTION# ====================================================================================================================
  1378. ; Author ........: Authenticity
  1379. ; Modified.......: UEZ
  1380. ; ===============================================================================================================================
  1381. Func _GDIPlus_GraphicsDrawCurve2($hGraphics, $aPoints, $nTension, $hPen = 0)
  1382. Local $iI, $iCount, $tPoints, $aResult
  1383. __GDIPlus_PenDefCreate($hPen)
  1384. $iCount = $aPoints[0][0]
  1385. $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  1386. For $iI = 1 To $iCount
  1387. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  1388. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  1389. Next
  1390. $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawCurve2", "handle", $hGraphics, "handle", $hPen, "struct*", $tPoints, "int", $iCount, "float", $nTension)
  1391. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  1392. If @error Then Return SetError(@error, @extended, False)
  1393. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1394. Return True
  1395. EndFunc ;==>_GDIPlus_GraphicsDrawCurve2
  1396. ; #FUNCTION# ====================================================================================================================
  1397. ; Author ........: Paul Campbell (PaulIA)
  1398. ; Modified.......: Gary Frost, UEZ, jpm
  1399. ; ===============================================================================================================================
  1400. Func _GDIPlus_GraphicsDrawEllipse($hGraphics, $nX, $nY, $nWidth, $nHeight, $hPen = 0)
  1401. __GDIPlus_PenDefCreate($hPen)
  1402. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawEllipse", "handle", $hGraphics, "handle", $hPen, "float", $nX, "float", $nY, _
  1403. "float", $nWidth, "float", $nHeight)
  1404. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  1405. If @error Then Return SetError(@error, @extended, False)
  1406. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1407. Return True
  1408. EndFunc ;==>_GDIPlus_GraphicsDrawEllipse
  1409. ; #FUNCTION# ====================================================================================================================
  1410. ; Author ........: Paul Campbell (PaulIA)
  1411. ; Modified.......: Gary Frost, UEZ, jpm
  1412. ; ===============================================================================================================================
  1413. Func _GDIPlus_GraphicsDrawImage($hGraphics, $hImage, $nX, $nY)
  1414. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawImage", "handle", $hGraphics, "handle", $hImage, "float", $nX, "float", $nY)
  1415. If @error Then Return SetError(@error, @extended, False)
  1416. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1417. Return True
  1418. EndFunc ;==>_GDIPlus_GraphicsDrawImage
  1419. ; #FUNCTION# ====================================================================================================================
  1420. ; Author ........: Authenticity
  1421. ; Modified.......: Eukalyptus
  1422. ; ===============================================================================================================================
  1423. Func _GDIPlus_GraphicsDrawImagePointsRect($hGraphics, $hImage, $nULX, $nULY, $nURX, $nURY, $nLLX, $nLLY, $nSrcX, $nSrcY, $nSrcWidth, $nSrcHeight, $hImageAttributes = 0, $iUnit = 2)
  1424. Local $tPoints = DllStructCreate("float X; float Y; float X2; float Y2; float X3; float Y3;")
  1425. DllStructSetData($tPoints, "X", $nULX)
  1426. DllStructSetData($tPoints, "Y", $nULY)
  1427. DllStructSetData($tPoints, "X2", $nURX)
  1428. DllStructSetData($tPoints, "Y2", $nURY)
  1429. DllStructSetData($tPoints, "X3", $nLLX)
  1430. DllStructSetData($tPoints, "Y3", $nLLY)
  1431. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawImagePointsRect", "handle", $hGraphics, "handle", $hImage, "struct*", $tPoints, "int", 3, "float", $nSrcX, "float", $nSrcY, "float", $nSrcWidth, "float", $nSrcHeight, "int", $iUnit, "handle", $hImageAttributes, "ptr", 0, "ptr", 0)
  1432. If @error Then Return SetError(@error, @extended, False)
  1433. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1434. Return True
  1435. EndFunc ;==>_GDIPlus_GraphicsDrawImagePointsRect
  1436. ; #FUNCTION# ====================================================================================================================
  1437. ; Author ........: smashly
  1438. ; Modified.......: UEZ, jpm
  1439. ; ===============================================================================================================================
  1440. Func _GDIPlus_GraphicsDrawImageRect($hGraphics, $hImage, $nX, $nY, $nW, $nH)
  1441. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawImageRect", "handle", $hGraphics, "handle", $hImage, "float", $nX, "float", $nY, _
  1442. "float", $nW, "float", $nH)
  1443. If @error Then Return SetError(@error, @extended, False)
  1444. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1445. Return True
  1446. EndFunc ;==>_GDIPlus_GraphicsDrawImageRect
  1447. ; #FUNCTION# ====================================================================================================================
  1448. ; Author ........: Paul Campbell (PaulIA)
  1449. ; Modified.......: Gary Frost, UEZ, jpm
  1450. ; ===============================================================================================================================
  1451. Func _GDIPlus_GraphicsDrawImageRectRect($hGraphics, $hImage, $nSrcX, $nSrcY, $nSrcWidth, $nSrcHeight, $nDstX, $nDstY, $nDstWidth, $nDstHeight, $pAttributes = 0, $iUnit = 2)
  1452. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawImageRectRect", "handle", $hGraphics, "handle", $hImage, _
  1453. "float", $nDstX, "float", $nDstY, "float", $nDstWidth, "float", $nDstHeight, _
  1454. "float", $nSrcX, "float", $nSrcY, "float", $nSrcWidth, "float", $nSrcHeight, _
  1455. "int", $iUnit, "handle", $pAttributes, "ptr", 0, "ptr", 0)
  1456. If @error Then Return SetError(@error, @extended, False)
  1457. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1458. Return True
  1459. EndFunc ;==>_GDIPlus_GraphicsDrawImageRectRect
  1460. ; #FUNCTION# ====================================================================================================================
  1461. ; Author ........: Paul Campbell (PaulIA)
  1462. ; Modified.......: Gary Frost, UEZ, jpm
  1463. ; ===============================================================================================================================
  1464. Func _GDIPlus_GraphicsDrawLine($hGraphics, $nX1, $nY1, $nX2, $nY2, $hPen = 0)
  1465. __GDIPlus_PenDefCreate($hPen)
  1466. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawLine", "handle", $hGraphics, "handle", $hPen, "float", $nX1, "float", $nY1, _
  1467. "float", $nX2, "float", $nY2)
  1468. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  1469. If @error Then Return SetError(@error, @extended, False)
  1470. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1471. Return True
  1472. EndFunc ;==>_GDIPlus_GraphicsDrawLine
  1473. ; #FUNCTION# ====================================================================================================================
  1474. ; Author ........: Authenticity
  1475. ; Modified.......: Eukalyptus
  1476. ; ===============================================================================================================================
  1477. Func _GDIPlus_GraphicsDrawPath($hGraphics, $hPath, $hPen = 0)
  1478. __GDIPlus_PenDefCreate($hPen)
  1479. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawPath", "handle", $hGraphics, "handle", $hPen, "handle", $hPath)
  1480. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  1481. If @error Then Return SetError(@error, @extended, False)
  1482. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1483. Return True
  1484. EndFunc ;==>_GDIPlus_GraphicsDrawPath
  1485. ; #FUNCTION# ====================================================================================================================
  1486. ; Author ........: Paul Campbell (PaulIA)
  1487. ; Modified.......: Gary Frost, UEZ, jpm
  1488. ; ===============================================================================================================================
  1489. Func _GDIPlus_GraphicsDrawPie($hGraphics, $nX, $nY, $nWidth, $nHeight, $fStartAngle, $fSweepAngle, $hPen = 0)
  1490. __GDIPlus_PenDefCreate($hPen)
  1491. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawPie", "handle", $hGraphics, "handle", $hPen, "float", $nX, "float", $nY, _
  1492. "float", $nWidth, "float", $nHeight, "float", $fStartAngle, "float", $fSweepAngle)
  1493. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  1494. If @error Then Return SetError(@error, @extended, False)
  1495. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1496. Return True
  1497. EndFunc ;==>_GDIPlus_GraphicsDrawPie
  1498. ; #FUNCTION# ====================================================================================================================
  1499. ; Author ........: Paul Campbell (PaulIA)
  1500. ; Modified.......: Gary Frost, UEZ, jpm
  1501. ; ===============================================================================================================================
  1502. Func _GDIPlus_GraphicsDrawPolygon($hGraphics, $aPoints, $hPen = 0)
  1503. Local $iCount = $aPoints[0][0]
  1504. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  1505. For $iI = 1 To $iCount
  1506. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  1507. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  1508. Next
  1509. __GDIPlus_PenDefCreate($hPen)
  1510. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawPolygon", "handle", $hGraphics, "handle", $hPen, "struct*", $tPoints, "int", $iCount)
  1511. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  1512. If @error Then Return SetError(@error, @extended, False)
  1513. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1514. Return True
  1515. EndFunc ;==>_GDIPlus_GraphicsDrawPolygon
  1516. ; #FUNCTION# ====================================================================================================================
  1517. ; Author ........: Paul Campbell (PaulIA)
  1518. ; Modified.......: Gary Frost, UEZ, jpm
  1519. ; ===============================================================================================================================
  1520. Func _GDIPlus_GraphicsDrawRect($hGraphics, $nX, $nY, $nWidth, $nHeight, $hPen = 0)
  1521. __GDIPlus_PenDefCreate($hPen)
  1522. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawRectangle", "handle", $hGraphics, "handle", $hPen, "float", $nX, "float", $nY, _
  1523. "float", $nWidth, "float", $nHeight)
  1524. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  1525. If @error Then Return SetError(@error, @extended, False)
  1526. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1527. Return True
  1528. EndFunc ;==>_GDIPlus_GraphicsDrawRect
  1529. ; #FUNCTION# ====================================================================================================================
  1530. ; Author ........: Paul Campbell (PaulIA)
  1531. ; Modified.......:
  1532. ; ===============================================================================================================================
  1533. Func _GDIPlus_GraphicsDrawString($hGraphics, $sString, $nX, $nY, $sFont = "Arial", $fSize = 10, $iFormat = 0)
  1534. Local $hBrush = _GDIPlus_BrushCreateSolid()
  1535. Local $hFormat = _GDIPlus_StringFormatCreate($iFormat)
  1536. Local $hFamily = _GDIPlus_FontFamilyCreate($sFont)
  1537. Local $hFont = _GDIPlus_FontCreate($hFamily, $fSize)
  1538. Local $tLayout = _GDIPlus_RectFCreate($nX, $nY, 0.0, 0.0)
  1539. Local $aInfo = _GDIPlus_GraphicsMeasureString($hGraphics, $sString, $hFont, $tLayout, $hFormat)
  1540. If @error Then Return SetError(@error, @extended, 0)
  1541. Local $aResult = _GDIPlus_GraphicsDrawStringEx($hGraphics, $sString, $hFont, $aInfo[0], $hFormat, $hBrush)
  1542. Local $iError = @error, $iExtended = @extended
  1543. _GDIPlus_FontDispose($hFont)
  1544. _GDIPlus_FontFamilyDispose($hFamily)
  1545. _GDIPlus_StringFormatDispose($hFormat)
  1546. _GDIPlus_BrushDispose($hBrush)
  1547. Return SetError($iError, $iExtended, $aResult)
  1548. EndFunc ;==>_GDIPlus_GraphicsDrawString
  1549. ; #FUNCTION# ====================================================================================================================
  1550. ; Author ........: Paul Campbell (PaulIA)
  1551. ; Modified.......: Gary Frost
  1552. ; ===============================================================================================================================
  1553. Func _GDIPlus_GraphicsDrawStringEx($hGraphics, $sString, $hFont, $tLayout, $hFormat, $hBrush)
  1554. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawString", "handle", $hGraphics, "wstr", $sString, "int", -1, "handle", $hFont, _
  1555. "struct*", $tLayout, "handle", $hFormat, "handle", $hBrush)
  1556. If @error Then Return SetError(@error, @extended, False)
  1557. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1558. Return True
  1559. EndFunc ;==>_GDIPlus_GraphicsDrawStringEx
  1560. ; #FUNCTION# ====================================================================================================================
  1561. ; Author ........: Paul Campbell (PaulIA)
  1562. ; Modified.......: Gary Frost, UEZ, jpm
  1563. ; ===============================================================================================================================
  1564. Func _GDIPlus_GraphicsFillClosedCurve($hGraphics, $aPoints, $hBrush = 0)
  1565. Local $iCount = $aPoints[0][0]
  1566. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  1567. For $iI = 1 To $iCount
  1568. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  1569. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  1570. Next
  1571. __GDIPlus_BrushDefCreate($hBrush)
  1572. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipFillClosedCurve", "handle", $hGraphics, "handle", $hBrush, "struct*", $tPoints, "int", $iCount)
  1573. __GDIPlus_BrushDefDispose()
  1574. If @error Then Return SetError(@error, @extended, False)
  1575. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1576. Return True
  1577. EndFunc ;==>_GDIPlus_GraphicsFillClosedCurve
  1578. ; #FUNCTION# ====================================================================================================================
  1579. ; Author ........: Authenticity
  1580. ; Modified.......: UEZ
  1581. ; ===============================================================================================================================
  1582. Func _GDIPlus_GraphicsFillClosedCurve2($hGraphics, $aPoints, $nTension, $hBrush = 0, $iFillMode = 0)
  1583. Local $iI, $iCount, $tPoints, $aResult
  1584. __GDIPlus_BrushDefCreate($hBrush)
  1585. $iCount = $aPoints[0][0]
  1586. $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  1587. For $iI = 1 To $iCount
  1588. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  1589. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  1590. Next
  1591. $aResult = DllCall($__g_hGDIPDll, "int", "GdipFillClosedCurve2", "handle", $hGraphics, "handle", $hBrush, "struct*", $tPoints, "int", $iCount, "float", $nTension, "int", $iFillMode)
  1592. __GDIPlus_BrushDefDispose()
  1593. If @error Then Return SetError(@error, @extended, False)
  1594. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1595. Return True
  1596. EndFunc ;==>_GDIPlus_GraphicsFillClosedCurve2
  1597. ; #FUNCTION# ====================================================================================================================
  1598. ; Author ........: Paul Campbell (PaulIA)
  1599. ; Modified.......: Gary Frost, UEZ, jpm
  1600. ; ===============================================================================================================================
  1601. Func _GDIPlus_GraphicsFillEllipse($hGraphics, $nX, $nY, $nWidth, $nHeight, $hBrush = 0)
  1602. __GDIPlus_BrushDefCreate($hBrush)
  1603. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipFillEllipse", "handle", $hGraphics, "handle", $hBrush, "float", $nX, "float", $nY, _
  1604. "float", $nWidth, "float", $nHeight)
  1605. __GDIPlus_BrushDefDispose()
  1606. If @error Then Return SetError(@error, @extended, False)
  1607. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1608. Return True
  1609. EndFunc ;==>_GDIPlus_GraphicsFillEllipse
  1610. ; #FUNCTION# ====================================================================================================================
  1611. ; Author ........: Authenticity
  1612. ; Modified.......: Eukalyptus
  1613. ; ===============================================================================================================================
  1614. Func _GDIPlus_GraphicsFillPath($hGraphics, $hPath, $hBrush = 0)
  1615. __GDIPlus_BrushDefCreate($hBrush)
  1616. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipFillPath", "handle", $hGraphics, "handle", $hBrush, "handle", $hPath)
  1617. __GDIPlus_BrushDefDispose()
  1618. If @error Then Return SetError(@error, @extended, False)
  1619. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1620. Return True
  1621. EndFunc ;==>_GDIPlus_GraphicsFillPath
  1622. ; #FUNCTION# ====================================================================================================================
  1623. ; Author ........: Paul Campbell (PaulIA)
  1624. ; Modified.......: Gary Frost, UEZ, jpm
  1625. ; ===============================================================================================================================
  1626. Func _GDIPlus_GraphicsFillPie($hGraphics, $nX, $nY, $nWidth, $nHeight, $fStartAngle, $fSweepAngle, $hBrush = 0)
  1627. __GDIPlus_BrushDefCreate($hBrush)
  1628. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipFillPie", "handle", $hGraphics, "handle", $hBrush, "float", $nX, "float", $nY, _
  1629. "float", $nWidth, "float", $nHeight, "float", $fStartAngle, "float", $fSweepAngle)
  1630. __GDIPlus_BrushDefDispose()
  1631. If @error Then Return SetError(@error, @extended, False)
  1632. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1633. Return True
  1634. EndFunc ;==>_GDIPlus_GraphicsFillPie
  1635. ; #FUNCTION# ====================================================================================================================
  1636. ; Author ........:
  1637. ; Modified.......: smashly, UEZ, jpm
  1638. ; ===============================================================================================================================
  1639. Func _GDIPlus_GraphicsFillPolygon($hGraphics, $aPoints, $hBrush = 0)
  1640. Local $iCount = $aPoints[0][0]
  1641. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  1642. For $iI = 1 To $iCount
  1643. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  1644. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  1645. Next
  1646. __GDIPlus_BrushDefCreate($hBrush)
  1647. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipFillPolygon", "handle", $hGraphics, "handle", $hBrush, _
  1648. "struct*", $tPoints, "int", $iCount, "int", "FillModeAlternate")
  1649. __GDIPlus_BrushDefDispose()
  1650. If @error Then Return SetError(@error, @extended, False)
  1651. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1652. Return True
  1653. EndFunc ;==>_GDIPlus_GraphicsFillPolygon
  1654. ; #FUNCTION# ====================================================================================================================
  1655. ; Author ........: Paul Campbell (PaulIA)
  1656. ; Modified.......: Gary Frost, UEZ, jpm
  1657. ; ===============================================================================================================================
  1658. Func _GDIPlus_GraphicsFillRect($hGraphics, $nX, $nY, $nWidth, $nHeight, $hBrush = 0)
  1659. __GDIPlus_BrushDefCreate($hBrush)
  1660. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipFillRectangle", "handle", $hGraphics, "handle", $hBrush, "float", $nX, "float", $nY, _
  1661. "float", $nWidth, "float", $nHeight)
  1662. __GDIPlus_BrushDefDispose()
  1663. If @error Then Return SetError(@error, @extended, False)
  1664. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1665. Return True
  1666. EndFunc ;==>_GDIPlus_GraphicsFillRect
  1667. ; #FUNCTION# ====================================================================================================================
  1668. ; Author ........: Authenticity
  1669. ; Modified.......: Eukalyptus
  1670. ; ===============================================================================================================================
  1671. Func _GDIPlus_GraphicsFillRegion($hGraphics, $hRegion, $hBrush = 0)
  1672. __GDIPlus_BrushDefCreate($hBrush)
  1673. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipFillRegion", "handle", $hGraphics, "handle", $hBrush, "handle", $hRegion)
  1674. __GDIPlus_BrushDefDispose()
  1675. If @error Then Return SetError(@error, @extended, False)
  1676. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1677. Return True
  1678. EndFunc ;==>_GDIPlus_GraphicsFillRegion
  1679. ; #FUNCTION# ====================================================================================================================
  1680. ; Author ........: Authenticity
  1681. ; Modified.......: Eukalyptus
  1682. ; ===============================================================================================================================
  1683. Func _GDIPlus_GraphicsGetCompositingMode($hGraphics)
  1684. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetCompositingMode", "handle", $hGraphics, "int*", 0)
  1685. If @error Then Return SetError(@error, @extended, -1)
  1686. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  1687. Return $aResult[2]
  1688. EndFunc ;==>_GDIPlus_GraphicsGetCompositingMode
  1689. ; #FUNCTION# ====================================================================================================================
  1690. ; Author ........: Authenticity
  1691. ; Modified.......: Eukalyptus
  1692. ; ===============================================================================================================================
  1693. Func _GDIPlus_GraphicsGetCompositingQuality($hGraphics)
  1694. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetCompositingQuality", "handle", $hGraphics, "int*", 0)
  1695. If @error Then Return SetError(@error, @extended, -1)
  1696. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  1697. Return $aResult[2]
  1698. EndFunc ;==>_GDIPlus_GraphicsGetCompositingQuality
  1699. ; #FUNCTION# ====================================================================================================================
  1700. ; Author ........: Paul Campbell (PaulIA)
  1701. ; Modified.......: Gary Frost
  1702. ; ===============================================================================================================================
  1703. Func _GDIPlus_GraphicsGetDC($hGraphics)
  1704. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetDC", "handle", $hGraphics, "handle*", 0)
  1705. If @error Then Return SetError(@error, @extended, 0)
  1706. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1707. Return $aResult[2]
  1708. EndFunc ;==>_GDIPlus_GraphicsGetDC
  1709. ; #FUNCTION# ====================================================================================================================
  1710. ; Author ........: Authenticity
  1711. ; Modified.......: UEZ
  1712. ; ===============================================================================================================================
  1713. Func _GDIPlus_GraphicsGetInterpolationMode($hGraphics)
  1714. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetInterpolationMode", "handle", $hGraphics, "int*", 0)
  1715. If @error Then Return SetError(@error, @extended, -1)
  1716. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  1717. Return $aResult[2]
  1718. EndFunc ;==>_GDIPlus_GraphicsGetInterpolationMode
  1719. ; #FUNCTION# ====================================================================================================================
  1720. ; Author ........: Paul Campbell (PaulIA)
  1721. ; Modified.......: Gary Frost, UEZ
  1722. ; ===============================================================================================================================
  1723. Func _GDIPlus_GraphicsGetSmoothingMode($hGraphics)
  1724. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetSmoothingMode", "handle", $hGraphics, "int*", 0)
  1725. If @error Then Return SetError(@error, @extended, -1)
  1726. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  1727. Switch $aResult[2]
  1728. Case $GDIP_SMOOTHINGMODE_NONE
  1729. Return 0
  1730. Case $GDIP_SMOOTHINGMODE_HIGHQUALITY, $GDIP_SMOOTHINGMODE_ANTIALIAS8X4
  1731. Return 1
  1732. Case $GDIP_SMOOTHINGMODE_ANTIALIAS8X8
  1733. Return 2
  1734. Case Else
  1735. Return 0
  1736. EndSwitch
  1737. EndFunc ;==>_GDIPlus_GraphicsGetSmoothingMode
  1738. ; #FUNCTION# ====================================================================================================================
  1739. ; Author ........: Authenticity
  1740. ; Modified.......: Eukalyptus
  1741. ; ===============================================================================================================================
  1742. Func _GDIPlus_GraphicsGetTransform($hGraphics, $hMatrix)
  1743. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetWorldTransform", "handle", $hGraphics, "handle", $hMatrix)
  1744. If @error Then Return SetError(@error, @extended, False)
  1745. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1746. Return True
  1747. EndFunc ;==>_GDIPlus_GraphicsGetTransform
  1748. ; #FUNCTION# ====================================================================================================================
  1749. ; Author ........: Authenticity
  1750. ; Modified.......: Eukalyptus
  1751. ; ===============================================================================================================================
  1752. Func _GDIPlus_GraphicsMeasureCharacterRanges($hGraphics, $sString, $hFont, $tLayout, $hStringFormat)
  1753. Local $iCount = _GDIPlus_StringFormatGetMeasurableCharacterRangeCount($hStringFormat)
  1754. If @error Then Return SetError(@error, @extended, 0)
  1755. Local $tRegions = DllStructCreate("handle[" & $iCount & "]")
  1756. Local $aRegions[$iCount + 1] = [$iCount]
  1757. For $iI = 1 To $iCount
  1758. $aRegions[$iI] = _GDIPlus_RegionCreate()
  1759. DllStructSetData($tRegions, 1, $aRegions[$iI], $iI)
  1760. Next
  1761. DllCall($__g_hGDIPDll, "int", "GdipMeasureCharacterRanges", "handle", $hGraphics, "wstr", $sString, "int", -1, "hwnd", $hFont, "struct*", $tLayout, "handle", $hStringFormat, "int", $iCount, "struct*", $tRegions)
  1762. Local $iError = @error, $iExtended = @extended
  1763. If $iError Then
  1764. For $iI = 1 To $iCount
  1765. _GDIPlus_RegionDispose($aRegions[$iI])
  1766. Next
  1767. Return SetError($iError + 10, $iExtended, 0)
  1768. EndIf
  1769. Return $aRegions
  1770. EndFunc ;==>_GDIPlus_GraphicsMeasureCharacterRanges
  1771. ; #FUNCTION# ====================================================================================================================
  1772. ; Author ........: Paul Campbell (PaulIA)
  1773. ; Modified.......: Gary Frost
  1774. ; ===============================================================================================================================
  1775. Func _GDIPlus_GraphicsMeasureString($hGraphics, $sString, $hFont, $tLayout, $hFormat)
  1776. Local $tRECTF = DllStructCreate($tagGDIPRECTF)
  1777. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipMeasureString", "handle", $hGraphics, "wstr", $sString, "int", -1, "handle", $hFont, _
  1778. "struct*", $tLayout, "handle", $hFormat, "struct*", $tRECTF, "int*", 0, "int*", 0)
  1779. If @error Then Return SetError(@error, @extended, 0)
  1780. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1781. Local $aInfo[3]
  1782. $aInfo[0] = $tRECTF
  1783. $aInfo[1] = $aResult[8]
  1784. $aInfo[2] = $aResult[9]
  1785. Return $aInfo
  1786. EndFunc ;==>_GDIPlus_GraphicsMeasureString
  1787. ; #FUNCTION# ====================================================================================================================
  1788. ; Author ........: Paul Campbell (PaulIA)
  1789. ; Modified.......: Gary Frost
  1790. ; ===============================================================================================================================
  1791. Func _GDIPlus_GraphicsReleaseDC($hGraphics, $hDC)
  1792. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipReleaseDC", "handle", $hGraphics, "handle", $hDC)
  1793. If @error Then Return SetError(@error, @extended, 0)
  1794. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1795. Return $aResult[2]
  1796. EndFunc ;==>_GDIPlus_GraphicsReleaseDC
  1797. ; #FUNCTION# ====================================================================================================================
  1798. ; Author ........: Authenticity
  1799. ; Modified.......: Eukalyptus
  1800. ; ===============================================================================================================================
  1801. Func _GDIPlus_GraphicsResetClip($hGraphics)
  1802. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipResetClip", "handle", $hGraphics)
  1803. If @error Then Return SetError(@error, @extended, False)
  1804. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1805. Return True
  1806. EndFunc ;==>_GDIPlus_GraphicsResetClip
  1807. ; #FUNCTION# ====================================================================================================================
  1808. ; Author ........: Authenticity
  1809. ; Modified.......: Eukalyptus
  1810. ; ===============================================================================================================================
  1811. Func _GDIPlus_GraphicsResetTransform($hGraphics)
  1812. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipResetWorldTransform", "handle", $hGraphics)
  1813. If @error Then Return SetError(@error, @extended, False)
  1814. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1815. Return True
  1816. EndFunc ;==>_GDIPlus_GraphicsResetTransform
  1817. ; #FUNCTION# ====================================================================================================================
  1818. ; Author ........: Authenticity
  1819. ; Modified.......: Eukalyptus
  1820. ; ===============================================================================================================================
  1821. Func _GDIPlus_GraphicsRestore($hGraphics, $iState)
  1822. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipRestoreGraphics", "handle", $hGraphics, "uint", $iState)
  1823. If @error Then Return SetError(@error, @extended, False)
  1824. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1825. Return True
  1826. EndFunc ;==>_GDIPlus_GraphicsRestore
  1827. ; #FUNCTION# ====================================================================================================================
  1828. ; Author ........: Authenticity
  1829. ; Modified.......: Eukalyptus
  1830. ; ===============================================================================================================================
  1831. Func _GDIPlus_GraphicsRotateTransform($hGraphics, $fAngle, $iOrder = 0)
  1832. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipRotateWorldTransform", "handle", $hGraphics, "float", $fAngle, "int", $iOrder)
  1833. If @error Then Return SetError(@error, @extended, False)
  1834. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1835. Return True
  1836. EndFunc ;==>_GDIPlus_GraphicsRotateTransform
  1837. ; #FUNCTION# ====================================================================================================================
  1838. ; Author ........: Authenticity
  1839. ; Modified.......: Eukalyptus
  1840. ; ===============================================================================================================================
  1841. Func _GDIPlus_GraphicsSave($hGraphics)
  1842. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSaveGraphics", "handle", $hGraphics, "uint*", 0)
  1843. If @error Then Return SetError(@error, @extended, 0)
  1844. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1845. Return $aResult[2]
  1846. EndFunc ;==>_GDIPlus_GraphicsSave
  1847. ; #FUNCTION# ====================================================================================================================
  1848. ; Author ........: Authenticity
  1849. ; Modified.......: Eukalyptus
  1850. ; ===============================================================================================================================
  1851. Func _GDIPlus_GraphicsScaleTransform($hGraphics, $fScaleX, $fScaleY, $iOrder = 0)
  1852. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipScaleWorldTransform", "handle", $hGraphics, "float", $fScaleX, "float", $fScaleY, "int", $iOrder)
  1853. If @error Then Return SetError(@error, @extended, False)
  1854. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1855. Return True
  1856. EndFunc ;==>_GDIPlus_GraphicsScaleTransform
  1857. ; #FUNCTION# ====================================================================================================================
  1858. ; Author ........: Authenticity
  1859. ; Modified.......: Eukalyptus
  1860. ; ===============================================================================================================================
  1861. Func _GDIPlus_GraphicsSetClipPath($hGraphics, $hPath, $iCombineMode = 0)
  1862. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetClipPath", "handle", $hGraphics, "handle", $hPath, "int", $iCombineMode)
  1863. If @error Then Return SetError(@error, @extended, False)
  1864. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1865. Return True
  1866. EndFunc ;==>_GDIPlus_GraphicsSetClipPath
  1867. ; #FUNCTION# ====================================================================================================================
  1868. ; Author ........: Authenticity
  1869. ; Modified.......: Eukalyptus, jpm
  1870. ; ===============================================================================================================================
  1871. Func _GDIPlus_GraphicsSetClipRect($hGraphics, $nX, $nY, $nWidth, $nHeight, $iCombineMode = 0)
  1872. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetClipRect", "handle", $hGraphics, "float", $nX, "float", $nY, "float", $nWidth, "float", $nHeight, "int", $iCombineMode)
  1873. If @error Then Return SetError(@error, @extended, False)
  1874. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1875. Return True
  1876. EndFunc ;==>_GDIPlus_GraphicsSetClipRect
  1877. ; #FUNCTION# ====================================================================================================================
  1878. ; Author ........: Authenticity
  1879. ; Modified.......: Eukalyptus
  1880. ; ===============================================================================================================================
  1881. Func _GDIPlus_GraphicsSetClipRegion($hGraphics, $hRegion, $iCombineMode = 0)
  1882. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetClipRegion", "handle", $hGraphics, "handle", $hRegion, "int", $iCombineMode)
  1883. If @error Then Return SetError(@error, @extended, False)
  1884. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1885. Return True
  1886. EndFunc ;==>_GDIPlus_GraphicsSetClipRegion
  1887. ; #FUNCTION# ====================================================================================================================
  1888. ; Author ........: Authenticity
  1889. ; Modified.......: Eukalyptus
  1890. ; ===============================================================================================================================
  1891. Func _GDIPlus_GraphicsSetCompositingMode($hGraphics, $iCompositionMode)
  1892. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetCompositingMode", "handle", $hGraphics, "int", $iCompositionMode)
  1893. If @error Then Return SetError(@error, @extended, False)
  1894. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1895. Return True
  1896. EndFunc ;==>_GDIPlus_GraphicsSetCompositingMode
  1897. ; #FUNCTION# ====================================================================================================================
  1898. ; Author ........: Authenticity
  1899. ; Modified.......: Eukalyptus
  1900. ; ===============================================================================================================================
  1901. Func _GDIPlus_GraphicsSetCompositingQuality($hGraphics, $iCompositionQuality)
  1902. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetCompositingQuality", "handle", $hGraphics, "int", $iCompositionQuality)
  1903. If @error Then Return SetError(@error, @extended, False)
  1904. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1905. Return True
  1906. EndFunc ;==>_GDIPlus_GraphicsSetCompositingQuality
  1907. ; #FUNCTION# ====================================================================================================================
  1908. ; Author ........: Authenticity
  1909. ; Modified.......: UEZ
  1910. ; ===============================================================================================================================
  1911. Func _GDIPlus_GraphicsSetInterpolationMode($hGraphics, $iInterpolationMode)
  1912. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetInterpolationMode", "handle", $hGraphics, "int", $iInterpolationMode)
  1913. If @error Then Return SetError(@error, @extended, False)
  1914. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1915. Return True
  1916. EndFunc ;==>_GDIPlus_GraphicsSetInterpolationMode
  1917. ; #FUNCTION# ====================================================================================================================
  1918. ; Author ........: Authenticity
  1919. ; Modified.......: UEZ
  1920. ; ===============================================================================================================================
  1921. Func _GDIPlus_GraphicsSetPixelOffsetMode($hGraphics, $iPixelOffsetMode)
  1922. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPixelOffsetMode", "handle", $hGraphics, "int", $iPixelOffsetMode)
  1923. If @error Then Return SetError(@error, @extended, False)
  1924. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1925. Return True
  1926. EndFunc ;==>_GDIPlus_GraphicsSetPixelOffsetMode
  1927. ; #FUNCTION# ====================================================================================================================
  1928. ; Author ........: Paul Campbell (PaulIA)
  1929. ; Modified.......: Gary Frost, UEZ
  1930. ; ===============================================================================================================================
  1931. Func _GDIPlus_GraphicsSetSmoothingMode($hGraphics, $iSmooth)
  1932. If $iSmooth < $GDIP_SMOOTHINGMODE_DEFAULT Or $iSmooth > $GDIP_SMOOTHINGMODE_ANTIALIAS8X8 Then $iSmooth = $GDIP_SMOOTHINGMODE_DEFAULT
  1933. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetSmoothingMode", "handle", $hGraphics, "int", $iSmooth)
  1934. If @error Then Return SetError(@error, @extended, False)
  1935. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1936. Return True
  1937. EndFunc ;==>_GDIPlus_GraphicsSetSmoothingMode
  1938. ; #FUNCTION# ====================================================================================================================
  1939. ; Author ........: Authenticity
  1940. ; Modified.......: UEZ
  1941. ; ===============================================================================================================================
  1942. Func _GDIPlus_GraphicsSetTextRenderingHint($hGraphics, $iTextRenderingHint)
  1943. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetTextRenderingHint", "handle", $hGraphics, "int", $iTextRenderingHint)
  1944. If @error Then Return SetError(@error, @extended, False)
  1945. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1946. Return True
  1947. EndFunc ;==>_GDIPlus_GraphicsSetTextRenderingHint
  1948. ; #FUNCTION# ====================================================================================================================
  1949. ; Author ........: Paul Campbell (PaulIA)
  1950. ; Modified.......: Gary Frost
  1951. ; ===============================================================================================================================
  1952. Func _GDIPlus_GraphicsSetTransform($hGraphics, $hMatrix)
  1953. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetWorldTransform", "handle", $hGraphics, "handle", $hMatrix)
  1954. If @error Then Return SetError(@error, @extended, False)
  1955. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1956. Return True
  1957. EndFunc ;==>_GDIPlus_GraphicsSetTransform
  1958. ; #FUNCTION# ====================================================================================================================
  1959. ; Author ........: Authenticity
  1960. ; Modified.......: Eukalyptus
  1961. ; ===============================================================================================================================
  1962. Func _GDIPlus_GraphicsTransformPoints($hGraphics, ByRef $aPoints, $iCoordSpaceTo = 0, $iCoordSpaceFrom = 1)
  1963. Local $iCount = $aPoints[0][0]
  1964. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  1965. For $iI = 1 To $iCount
  1966. DllStructSetData($tPoints, 1, $aPoints[$iI][0], ($iI - 1) * 2 + 1)
  1967. DllStructSetData($tPoints, 1, $aPoints[$iI][1], ($iI - 1) * 2 + 2)
  1968. Next
  1969. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipTransformPoints", "handle", $hGraphics, "int", $iCoordSpaceTo, "int", $iCoordSpaceFrom, "struct*", $tPoints, "int", $iCount)
  1970. If @error Then Return SetError(@error, @extended, False)
  1971. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1972. For $iI = 1 To $iCount
  1973. $aPoints[$iI][0] = DllStructGetData($tPoints, 1, ($iI - 1) * 2 + 1)
  1974. $aPoints[$iI][1] = DllStructGetData($tPoints, 1, ($iI - 1) * 2 + 2)
  1975. Next
  1976. Return True
  1977. EndFunc ;==>_GDIPlus_GraphicsTransformPoints
  1978. ; #FUNCTION# ====================================================================================================================
  1979. ; Author ........: Authenticity
  1980. ; Modified.......: Eukalyptus
  1981. ; ===============================================================================================================================
  1982. Func _GDIPlus_GraphicsTranslateTransform($hGraphics, $nDX, $nDY, $iOrder = 0)
  1983. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipTranslateWorldTransform", "handle", $hGraphics, "float", $nDX, "float", $nDY, "int", $iOrder)
  1984. If @error Then Return SetError(@error, @extended, False)
  1985. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  1986. Return True
  1987. EndFunc ;==>_GDIPlus_GraphicsTranslateTransform
  1988. ; #FUNCTION# ====================================================================================================================
  1989. ; Author ........: Authenticity
  1990. ; Modified.......: Eukalyptus
  1991. ; ===============================================================================================================================
  1992. Func _GDIPlus_HatchBrushCreate($iHatchStyle = 0, $iARGBForeground = 0xFFFFFFFF, $iARGBBackground = 0xFFFFFFFF)
  1993. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateHatchBrush", "int", $iHatchStyle, "uint", $iARGBForeground, "uint", $iARGBBackground, "handle*", 0)
  1994. If @error Then Return SetError(@error, @extended, 0)
  1995. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  1996. Return $aResult[4]
  1997. EndFunc ;==>_GDIPlus_HatchBrushCreate
  1998. ; #FUNCTION# ====================================================================================================================
  1999. ; Author ........: Authenticity
  2000. ; Modified.......: Eukalyptus
  2001. ; ===============================================================================================================================
  2002. Func _GDIPlus_HICONCreateFromBitmap($hBitmap)
  2003. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateHICONFromBitmap", "handle", $hBitmap, "handle*", 0)
  2004. If @error Then Return SetError(@error, @extended, 0)
  2005. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2006. Return $aResult[2]
  2007. EndFunc ;==>_GDIPlus_HICONCreateFromBitmap
  2008. ; #FUNCTION# ====================================================================================================================
  2009. ; Author ........: Authenticity
  2010. ; Modified.......: UEZ
  2011. ; ===============================================================================================================================
  2012. Func _GDIPlus_ImageAttributesCreate()
  2013. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateImageAttributes", "handle*", 0)
  2014. If @error Then Return SetError(@error, @extended, 0)
  2015. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2016. Return $aResult[1]
  2017. EndFunc ;==>_GDIPlus_ImageAttributesCreate
  2018. ; #FUNCTION# ====================================================================================================================
  2019. ; Author ........: Authenticity
  2020. ; Modified.......: UEZ
  2021. ; ===============================================================================================================================
  2022. Func _GDIPlus_ImageAttributesDispose($hImageAttributes)
  2023. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDisposeImageAttributes", "handle", $hImageAttributes)
  2024. If @error Then Return SetError(@error, @extended, False)
  2025. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2026. Return True
  2027. EndFunc ;==>_GDIPlus_ImageAttributesDispose
  2028. ; #FUNCTION# ====================================================================================================================
  2029. ; Author ........: Authenticity
  2030. ; Modified.......: UEZ
  2031. ; ===============================================================================================================================
  2032. Func _GDIPlus_ImageAttributesSetColorKeys($hImageAttributes, $iColorAdjustType = 0, $bEnable = False, $iARGBLow = 0, $iARGBHigh = 0)
  2033. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetImageAttributesColorKeys", "handle", $hImageAttributes, "int", $iColorAdjustType, "int", $bEnable, "uint", $iARGBLow, "uint", $iARGBHigh)
  2034. If @error Then Return SetError(@error, @extended, False)
  2035. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2036. Return True
  2037. EndFunc ;==>_GDIPlus_ImageAttributesSetColorKeys
  2038. ; #FUNCTION# ====================================================================================================================
  2039. ; Author ........: Authenticity
  2040. ; Modified.......: UEZ
  2041. ; ===============================================================================================================================
  2042. Func _GDIPlus_ImageAttributesSetColorMatrix($hImageAttributes, $iColorAdjustType = 0, $bEnable = False, $tClrMatrix = 0, $tGrayMatrix = 0, $iColorMatrixFlags = 0)
  2043. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetImageAttributesColorMatrix", "handle", $hImageAttributes, "int", $iColorAdjustType, "int", $bEnable, "struct*", $tClrMatrix, "struct*", $tGrayMatrix, "int", $iColorMatrixFlags)
  2044. If @error Then Return SetError(@error, @extended, False)
  2045. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2046. Return True
  2047. EndFunc ;==>_GDIPlus_ImageAttributesSetColorMatrix
  2048. ; #FUNCTION# ====================================================================================================================
  2049. ; Author ........: Authenticity
  2050. ; Modified ......: Eukalyptus
  2051. ; ===============================================================================================================================
  2052. Func _GDIPlus_ImageAttributesSetRemapTable($hImageAttributes, $aColorMap = 0, $iColorAdjustType = 0, $bEnable = True)
  2053. Local $aResult
  2054. If IsArray($aColorMap) Then
  2055. Local $iCount = $aColorMap[0][0]
  2056. Local $tColorMap = DllStructCreate("uint[" & $iCount * 2 & "]")
  2057. For $i = 1 To $iCount
  2058. DllStructSetData($tColorMap, 1, $aColorMap[$i][0], ($i - 1) * 2 + 1)
  2059. DllStructSetData($tColorMap, 1, $aColorMap[$i][1], ($i - 1) * 2 + 2)
  2060. Next
  2061. $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetImageAttributesRemapTable", "handle", $hImageAttributes, "int", $iColorAdjustType, "int", $bEnable, "int", $iCount, "struct*", $tColorMap)
  2062. Else
  2063. $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetImageAttributesRemapTable", "handle", $hImageAttributes, "int", $iColorAdjustType, "int", $bEnable, "int", 0, "struct*", 0)
  2064. EndIf
  2065. If @error Then Return SetError(@error, @extended, False)
  2066. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2067. Return True
  2068. EndFunc ;==>_GDIPlus_ImageAttributesSetRemapTable
  2069. ; #FUNCTION# ====================================================================================================================
  2070. ; Author ........: UEZ
  2071. ; Modified ......:
  2072. ; ===============================================================================================================================
  2073. Func _GDIPlus_ImageAttributesSetThreshold($hImageAttributes, $fThreshold, $iColorAdjustType = $GDIP_COLORADJUSTTYPE_DEFAULT, $bEnable = True)
  2074. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetImageAttributesThreshold", "handle", $hImageAttributes, "int", $iColorAdjustType, "bool", $bEnable, "float", $fThreshold)
  2075. If @error Then Return SetError(@error, @extended, False)
  2076. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2077. Return True
  2078. EndFunc ;==>_GDIPlus_ImageAttributesSetThreshold
  2079. ; #FUNCTION# ====================================================================================================================
  2080. ; Author ........: UEZ
  2081. ; Modified ......:
  2082. ; ===============================================================================================================================
  2083. Func _GDIPlus_ImageClone($hImage)
  2084. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCloneImage", "handle", $hImage, "handle*", 0)
  2085. If @error Then Return SetError(@error, @extended, 0)
  2086. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2087. Return $aResult[2]
  2088. EndFunc ;==>_GDIPlus_ImageClone
  2089. ; #FUNCTION# ====================================================================================================================
  2090. ; Author ........: Paul Campbell (PaulIA)
  2091. ; Modified.......: Gary Frost
  2092. ; ===============================================================================================================================
  2093. Func _GDIPlus_ImageDispose($hImage)
  2094. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDisposeImage", "handle", $hImage)
  2095. If @error Then Return SetError(@error, @extended, False)
  2096. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2097. Return True
  2098. EndFunc ;==>_GDIPlus_ImageDispose
  2099. ; #FUNCTION# ====================================================================================================================
  2100. ; Author ........: Yashied
  2101. ; Modified.......: UEZ
  2102. ; ===============================================================================================================================
  2103. Func _GDIPlus_ImageGetDimension($hImage)
  2104. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageDimension", "handle", $hImage, "float*", 0, "float*", 0)
  2105. If @error Then Return SetError(@error, @extended, 0)
  2106. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2107. Local $aImgDim[2] = [$aResult[2], $aResult[3]]
  2108. Return $aImgDim
  2109. EndFunc ;==>_GDIPlus_ImageGetDimension
  2110. ; #FUNCTION# ====================================================================================================================
  2111. ; Author ........: rover
  2112. ; Modified.......: jpm
  2113. ; ===============================================================================================================================
  2114. Func _GDIPlus_ImageGetFlags($hImage)
  2115. Local $aFlag[2] = [0, ""]
  2116. If ($hImage = -1) Or (Not $hImage) Then Return SetError(11, 0, $aFlag)
  2117. Local $aImageFlags[13][2] = _
  2118. [["Pixel data Cacheable", $GDIP_IMAGEFLAGS_CACHING], _
  2119. ["Pixel data read-only", $GDIP_IMAGEFLAGS_READONLY], _
  2120. ["Pixel size in image", $GDIP_IMAGEFLAGS_HASREALPIXELSIZE], _
  2121. ["DPI info in image", $GDIP_IMAGEFLAGS_HASREALDPI], _
  2122. ["YCCK color space", $GDIP_IMAGEFLAGS_COLORSPACE_YCCK], _
  2123. ["YCBCR color space", $GDIP_IMAGEFLAGS_COLORSPACE_YCBCR], _
  2124. ["Grayscale image", $GDIP_IMAGEFLAGS_COLORSPACE_GRAY], _
  2125. ["CMYK color space", $GDIP_IMAGEFLAGS_COLORSPACE_CMYK], _
  2126. ["RGB color space", $GDIP_IMAGEFLAGS_COLORSPACE_RGB], _
  2127. ["Partially scalable", $GDIP_IMAGEFLAGS_PARTIALLYSCALABLE], _
  2128. ["Alpha values other than 0 (transparent) and 255 (opaque)", $GDIP_IMAGEFLAGS_HASTRANSLUCENT], _
  2129. ["Alpha values", $GDIP_IMAGEFLAGS_HASALPHA], _
  2130. ["Scalable", $GDIP_IMAGEFLAGS_SCALABLE]]
  2131. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageFlags", "handle", $hImage, "long*", 0)
  2132. If @error Then Return SetError(@error, @extended, $aFlag)
  2133. If $aResult[0] Then Return SetError(10, $aResult[0], $aFlag)
  2134. If $aResult[2] = $GDIP_IMAGEFLAGS_NONE Then
  2135. $aFlag[1] = "No pixel data"
  2136. Return SetError(12, $aResult[2], $aFlag)
  2137. EndIf
  2138. $aFlag[0] = $aResult[2]
  2139. For $i = 0 To 12
  2140. If BitAND($aResult[2], $aImageFlags[$i][1]) = $aImageFlags[$i][1] Then
  2141. If StringLen($aFlag[1]) Then $aFlag[1] &= "|"
  2142. $aResult[2] -= $aImageFlags[$i][1]
  2143. $aFlag[1] &= $aImageFlags[$i][0]
  2144. EndIf
  2145. Next
  2146. Return $aFlag
  2147. EndFunc ;==>_GDIPlus_ImageGetFlags
  2148. ; #FUNCTION# ====================================================================================================================
  2149. ; Author ........: UEZ
  2150. ; Modified ......: Eukalyptus
  2151. ; ===============================================================================================================================
  2152. Func _GDIPlus_ImageGetFrameCount($hImage, $sDimensionID)
  2153. Local $tGUID = _WinAPI_GUIDFromString($sDimensionID)
  2154. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipImageGetFrameCount", "handle", $hImage, "struct*", $tGUID, "uint*", 0)
  2155. If @error Then Return SetError(@error, @extended, -1)
  2156. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  2157. Return $aResult[3]
  2158. EndFunc ;==>_GDIPlus_ImageGetFrameCount
  2159. ; #FUNCTION# ====================================================================================================================
  2160. ; Author ........: Paul Campbell (PaulIA)
  2161. ; Modified.......: Gary Frost
  2162. ; ===============================================================================================================================
  2163. Func _GDIPlus_ImageGetGraphicsContext($hImage)
  2164. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageGraphicsContext", "handle", $hImage, "handle*", 0)
  2165. If @error Then Return SetError(@error, @extended, 0)
  2166. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2167. Return $aResult[2]
  2168. EndFunc ;==>_GDIPlus_ImageGetGraphicsContext
  2169. ; #FUNCTION# ====================================================================================================================
  2170. ; Author ........: Paul Campbell (PaulIA)
  2171. ; Modified.......: Gary Frost
  2172. ; ===============================================================================================================================
  2173. Func _GDIPlus_ImageGetHeight($hImage)
  2174. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageHeight", "handle", $hImage, "uint*", 0)
  2175. If @error Then Return SetError(@error, @extended, -1)
  2176. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  2177. Return $aResult[2]
  2178. EndFunc ;==>_GDIPlus_ImageGetHeight
  2179. ; #FUNCTION# ====================================================================================================================
  2180. ; Author ........: rover
  2181. ; Modified.......: jpm
  2182. ; ===============================================================================================================================
  2183. Func _GDIPlus_ImageGetHorizontalResolution($hImage)
  2184. If ($hImage = -1) Or (Not $hImage) Then Return SetError(11, 0, 0)
  2185. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageHorizontalResolution", "handle", $hImage, "float*", 0)
  2186. If @error Then Return SetError(@error, @extended, 0)
  2187. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2188. Return Round($aResult[2])
  2189. EndFunc ;==>_GDIPlus_ImageGetHorizontalResolution
  2190. ; #FUNCTION# ====================================================================================================================
  2191. ; Author ........: rover
  2192. ; Modified.......: jpm
  2193. ; ===============================================================================================================================
  2194. Func _GDIPlus_ImageGetPixelFormat($hImage)
  2195. Local $aFormat[2] = [0, ""]
  2196. If ($hImage = -1) Or (Not $hImage) Then Return SetError(11, 0, $aFormat)
  2197. Local $aPixelFormat[14][2] = _
  2198. [["1 Bpp Indexed", $GDIP_PXF01INDEXED], _
  2199. ["4 Bpp Indexed", $GDIP_PXF04INDEXED], _
  2200. ["8 Bpp Indexed", $GDIP_PXF08INDEXED], _
  2201. ["16 Bpp Grayscale", $GDIP_PXF16GRAYSCALE], _
  2202. ["16 Bpp RGB 555", $GDIP_PXF16RGB555], _
  2203. ["16 Bpp RGB 565", $GDIP_PXF16RGB565], _
  2204. ["16 Bpp ARGB 1555", $GDIP_PXF16ARGB1555], _
  2205. ["24 Bpp RGB", $GDIP_PXF24RGB], _
  2206. ["32 Bpp RGB", $GDIP_PXF32RGB], _
  2207. ["32 Bpp ARGB", $GDIP_PXF32ARGB], _
  2208. ["32 Bpp PARGB", $GDIP_PXF32PARGB], _
  2209. ["48 Bpp RGB", $GDIP_PXF48RGB], _
  2210. ["64 Bpp ARGB", $GDIP_PXF64ARGB], _
  2211. ["64 Bpp PARGB", $GDIP_PXF64PARGB]]
  2212. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImagePixelFormat", "handle", $hImage, "int*", 0)
  2213. If @error Then Return SetError(@error, @extended, $aFormat)
  2214. If $aResult[0] Then Return SetError(10, $aResult[0], $aFormat)
  2215. For $i = 0 To 13
  2216. If $aPixelFormat[$i][1] = $aResult[2] Then
  2217. $aFormat[0] = $aPixelFormat[$i][1]
  2218. $aFormat[1] = $aPixelFormat[$i][0]
  2219. Return $aFormat
  2220. EndIf
  2221. Next
  2222. Return SetError(12, 0, $aFormat)
  2223. EndFunc ;==>_GDIPlus_ImageGetPixelFormat
  2224. ; #INTERNAL_USE_ONLY# ===========================================================================================================
  2225. ; Name ..........: __GDIPlus_ImageGetPropertyCount
  2226. ; Description ...: Gets the number of properties (pieces of metadata) stored in an image object
  2227. ; Syntax ........: __GDIPlus_ImageGetPropertyCount($hImage)
  2228. ; Parameters ....: $hImage - Pointer to an image object
  2229. ; Return values .: Success - Number of property items stored in the image object
  2230. ; Failure - -1 and sets the @error flag to non-zero, @extended may contain GPSTATUS error code ($GPID_ERR*).
  2231. ; Author ........: Authenticity
  2232. ; Modified ......: Eukalyptus
  2233. ; Remarks .......:
  2234. ; Related .......: _GDIPlus_ImageGetPropertyIdList
  2235. ; Link ..........: @@MsdnLink@@ GdipGetPropertyCount
  2236. ; Example .......: No
  2237. ; ===============================================================================================================================
  2238. Func __GDIPlus_ImageGetPropertyCount($hImage)
  2239. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPropertyCount", "handle", $hImage, "uint*", 0)
  2240. If @error Then Return SetError(@error, @extended, -1)
  2241. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  2242. Return $aResult[2]
  2243. EndFunc ;==>__GDIPlus_ImageGetPropertyCount
  2244. ; #FUNCTION# ====================================================================================================================
  2245. ; Author ........: Eukalyptus
  2246. ; Modified ......:
  2247. ; ===============================================================================================================================
  2248. Func _GDIPlus_ImageGetPropertyIdList($hImage)
  2249. Local $iCount = __GDIPlus_ImageGetPropertyCount($hImage)
  2250. If @error Then Return SetError(@error, @extended, False)
  2251. Local $tProperties = DllStructCreate("uint[" & $iCount & "]")
  2252. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPropertyIdList", "handle", $hImage, "int", $iCount, "struct*", $tProperties)
  2253. If @error Then Return SetError(@error, @extended, False)
  2254. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2255. Local $sPropertyTagInfo = "0x0000=GpsVer;0x0001=GpsLatitudeRef;0x0002=GpsLatitude;0x0003=GpsLongitudeRef;0x0004=GpsLongitude;0x0005=GpsAltitudeRef;0x0006=GpsAltitude;0x0007=GpsGpsTime;0x0008=GpsGpsSatellites;0x0009=GpsGpsStatus;0x000A=GpsGpsMeasureMode;0x000B=GpsGpsDop;0x000C=GpsSpeedRef;0x000D=GpsSpeed;0x000E=GpsTrackRef;0x000F=GpsTrack;0x0010=GpsImgDirRef;0x0011=GpsImgDir;0x0012=GpsMapDatum;0x0013=GpsDestLatRef;0x0014=GpsDestLat;0x0015=GpsDestLongRef;0x0016=GpsDestLong;0x0017=GpsDestBearRef;0x0018=GpsDestBear;0x0019=GpsDestDistRef;0x001A=GpsDestDist;0x00FE=NewSubfileType;0x00FF=SubfileType;0x0100=ImageWidth;0x0101=ImageHeight;0x0102=BitsPerSample;0x0103=Compression;0x0106=PhotometricInterp;0x0107=ThreshHolding;0x0108=CellWidth;0x0109=CellHeight;0x010A=FillOrder;0x010D=DocumentName;0x010E=ImageDescription;0x010F=EquipMake;0x0110=EquipModel;0x0111=StripOffsets;0x0112=Orientation;0x0115=SamplesPerPixel;0x0116=RowsPerStrip;0x0117=StripBytesCount;0x0118=MinSampleValue;0x0119=MaxSampleValue;0x011A=XResolution;0x011B=YResolution;0x011C=PlanarConfig;0x011D=PageName;0x011E=XPosition;0x011F=YPosition;0x0120=FreeOffset;0x0121=FreeByteCounts;0x0122=GrayResponseUnit;0x0123=GrayResponseCurve;0x0124=T4Option;0x0125=T6Option;0x0128=ResolutionUnit;0x0129=PageNumber;0x012D=TransferFunction;0x0131=SoftwareUsed;0x0132=DateTime;0x013B=Artist;0x013C=HostComputer;0x013D=Predictor;0x013E=WhitePoint;0x013F=PrimaryChromaticities;0x0140=ColorMap;0x0141=HalftoneHints;0x0142=TileWidth;0x0143=TileLength;0x0144=TileOffset;0x0145=TileByteCounts;0x014C=InkSet;0x014D=InkNames;0x014E=NumberOfInks;0x0150=DotRange;0x0151=TargetPrinter;0x0152=ExtraSamples;0x0153=SampleFormat;0x0154=SMinSampleValue;0x0155=SMaxSampleValue;0x0156=TransferRange;0x0200=JPEGProc;0x0201=JPEGInterFormat;0x0202=JPEGInterLength;0x0203=JPEGRestartInterval;0x0205=JPEGLosslessPredictors;0x0206=JPEGPointTransforms;0x0207=JPEGQTables;0x0208=JPEGDCTables;0x0209=JPEGACTables;0x0211=YCbCrCoefficients;0x0212=YCbCrSubsampling;0x0213=YCbCrPositioning;0x0214=REFBlackWhite;0x0301=Gamma;0x0302=ICCProfileDescriptor;0x0303=SRGBRenderingIntent;0x0320=ImageTitle;0x5001=ResolutionXUnit;0x5002=ResolutionYUnit;0x5003=ResolutionXLengthUnit;0x5004=ResolutionYLengthUnit;0x5005=PrintFlags;0x5006=PrintFlagsVersion;0x5007=PrintFlagsCrop;0x5008=PrintFlagsBleedWidth;0x5009=PrintFlagsBleedWidthScale;0x500A=HalftoneLPI;0x500B=HalftoneLPIUnit;0x500C=HalftoneDegree;" & _
  2256. "0x500D=HalftoneShape;0x500E=HalftoneMisc;0x500F=HalftoneScreen;0x5010=JPEGQuality;0x5011=GridSize;0x5012=ThumbnailFormat;0x5013=ThumbnailWidth;0x5014=ThumbnailHeight;0x5015=ThumbnailColorDepth;0x5016=ThumbnailPlanes;0x5017=ThumbnailRawBytes;0x5018=ThumbnailSize;0x5019=ThumbnailCompressedSize;0x501A=ColorTransferFunction;0x501B=ThumbnailData;0x5020=ThumbnailImageWidth;0x5021=ThumbnailImageHeight;0x5022=ThumbnailBitsPerSample;0x5023=ThumbnailCompression;0x5024=ThumbnailPhotometricInterp;0x5025=ThumbnailImageDescription;0x5026=ThumbnailEquipMake;0x5027=ThumbnailEquipModel;0x5028=ThumbnailStripOffsets;0x5029=ThumbnailOrientation;0x502A=ThumbnailSamplesPerPixel;0x502B=ThumbnailRowsPerStrip;0x502C=ThumbnailStripBytesCount;0x502D=ThumbnailResolutionX;0x502E=ThumbnailResolutionY;0x502F=ThumbnailPlanarConfig;0x5030=ThumbnailResolutionUnit;0x5031=ThumbnailTransferFunction;0x5032=ThumbnailSoftwareUsed;0x5033=ThumbnailDateTime;0x5034=ThumbnailArtist;0x5035=ThumbnailWhitePoint;0x5036=ThumbnailPrimaryChromaticities;0x5037=ThumbnailYCbCrCoefficients;0x5038=ThumbnailYCbCrSubsampling;0x5039=ThumbnailYCbCrPositioning;0x503A=ThumbnailRefBlackWhite;0x503B=ThumbnailCopyRight;0x5090=LuminanceTable;0x5091=ChrominanceTable;0x5100=FrameDelay;0x5101=LoopCount;0x5102=GlobalPalette;0x5103=IndexBackground;0x5104=IndexTransparent;0x5110=PixelUnit;0x5111=PixelPerUnitX;0x5112=PixelPerUnitY;0x5113=PaletteHistogram;0x8298=Copyright;0x829A=ExifExposureTime;0x829D=ExifFNumber;0x8769=ExifIFD;0x8773=ICCProfile;0x8822=ExifExposureProg;0x8824=ExifSpectralSense;0x8825=GpsIFD;0x8827=ExifISOSpeed;0x8828=ExifOECF;0x9000=ExifVer;0x9003=ExifDTOrig;0x9004=ExifDTDigitized;0x9101=ExifCompConfig;0x9102=ExifCompBPP;0x9201=ExifShutterSpeed;0x9202=ExifAperture;0x9203=ExifBrightness;0x9204=ExifExposureBias;0x9205=ExifMaxAperture;0x9206=ExifSubjectDist;0x9207=ExifMeteringMode;0x9208=ExifLightSource;0x9209=ExifFlash;0x920A=ExifFocalLength;0x927C=ExifMakerNote;0x9286=ExifUserComment;0x9290=ExifDTSubsec;0x9291=ExifDTOrigSS;0x9292=ExifDTDigSS;0xA000=ExifFPXVer;0xA001=ExifColorSpace;0xA002=ExifPixXDim;0xA003=ExifPixYDim;0xA004=ExifRelatedWav;0xA005=ExifInterop;0xA20B=ExifFlashEnergy;0xA20C=ExifSpatialFR;0xA20E=ExifFocalXRes;0xA20F=ExifFocalYRes;0xA210=ExifFocalResUnit;0xA214=ExifSubjectLoc;0xA215=ExifExposureIndex;0xA217=ExifSensingMethod;0xA300=ExifFileSource;0xA301=ExifSceneType;0xA302=ExifCfaPattern"
  2257. Local $aProperties[$iCount + 1][2] = [[$iCount]]
  2258. Local $aRegExp
  2259. For $i = 1 To $iCount
  2260. $aProperties[$i][0] = DllStructGetData($tProperties, 1, $i)
  2261. $aRegExp = StringRegExp($sPropertyTagInfo, "(?i)" & Hex(DllStructGetData($tProperties, 1, $i), 4) & "=(\w+)", 3)
  2262. Switch IsArray($aRegExp)
  2263. Case True
  2264. $aProperties[$i][1] = $aRegExp[0]
  2265. Case Else
  2266. $aProperties[$i][1] = "PropertyTagUnKnown"
  2267. EndSwitch
  2268. Next
  2269. Return $aProperties
  2270. EndFunc ;==>_GDIPlus_ImageGetPropertyIdList
  2271. ; #INTERNAL_USE_ONLY# ===========================================================================================================
  2272. ; Name ..........: __GDIPlus_ImageGetPropertyItemSize
  2273. ; Description ...: Gets the size, in bytes, of a specified property item of an image object
  2274. ; Syntax ........: __GDIPlus_ImageGetPropertyItemSize($hImage, $iPropID)
  2275. ; Parameters ....: $hImage - Pointer to an image object
  2276. ; $iPropID - Identifier of the property item to be retrieved
  2277. ; Return values .: Success - Size in bytes of the property item
  2278. ; Failure - -1 and sets the @error flag to non-zero, @extended may contain GPSTATUS error code ($GPID_ERR*).
  2279. ; Author ........: Authenticity
  2280. ; Modified ......: Eukalyptus
  2281. ; Remarks .......:
  2282. ; Related .......: _GDIPlus_ImageGetPropertyItem
  2283. ; Link ..........: @@MsdnLink@@ GdipGetPropertyItemSize
  2284. ; Example .......: No
  2285. ; ===============================================================================================================================
  2286. Func __GDIPlus_ImageGetPropertyItemSize($hImage, $iPropID)
  2287. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPropertyItemSize", "handle", $hImage, "uint", $iPropID, "uint*", 0)
  2288. If @error Then Return SetError(@error, @extended, -1)
  2289. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  2290. Return $aResult[3]
  2291. EndFunc ;==>__GDIPlus_ImageGetPropertyItemSize
  2292. ; #FUNCTION# ====================================================================================================================
  2293. ; Author ........: Eukalyptus
  2294. ; Modified ......:
  2295. ; ===============================================================================================================================
  2296. Func _GDIPlus_ImageGetPropertyItem($hImage, $iPropID)
  2297. Local $iSize = __GDIPlus_ImageGetPropertyItemSize($hImage, $iPropID)
  2298. If @error Then Return SetError(@error, @extended, False)
  2299. Local $tBuffer = DllStructCreate("byte[" & $iSize & "];")
  2300. Local $pBuffer = DllStructGetPtr($tBuffer)
  2301. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPropertyItem", "handle", $hImage, "uint", $iPropID, "uint", $iSize, "struct*", $tBuffer)
  2302. If @error Then Return SetError(@error, @extended, -1)
  2303. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2304. Local $tPropertyItem = DllStructCreate("int id; int length; short type; ptr value;", $pBuffer)
  2305. Local $iBytes = DllStructGetData($tPropertyItem, "length")
  2306. Local $pValue = DllStructGetData($tPropertyItem, "value")
  2307. Local $tValues, $iValues
  2308. Switch DllStructGetData($tPropertyItem, "type")
  2309. Case 2 ;ASCII String
  2310. $iValues = 1
  2311. $tValues = DllStructCreate("char[" & $iBytes & "];", $pValue)
  2312. Case 3 ;Array of UShort
  2313. $iValues = Int($iBytes / 2)
  2314. $tValues = DllStructCreate("ushort[" & $iValues & "];", $pValue)
  2315. Case 4, 5 ;Array of UInt / Fraction
  2316. $iValues = Int($iBytes / 4)
  2317. $tValues = DllStructCreate("uint[" & $iValues & "];", $pValue)
  2318. Case 9, 10 ;Array of Int / Fraction
  2319. $iValues = Int($iBytes / 4)
  2320. $tValues = DllStructCreate("int[" & $iValues & "];", $pValue)
  2321. Case Else ;Array of Bytes
  2322. $iValues = 1
  2323. $tValues = DllStructCreate("byte[" & $iBytes & "];", $pValue)
  2324. EndSwitch
  2325. Local $aValues[$iValues + 1] = [$iValues]
  2326. Switch DllStructGetData($tPropertyItem, "type")
  2327. Case 5, 10 ;Pair of UInt Fraction [numerator][denominator]
  2328. $iValues = Int($iValues / 2)
  2329. ReDim $aValues[$iValues + 1]
  2330. $aValues[0] = $iValues
  2331. For $j = 1 To $iValues
  2332. $aValues[$j] = DllStructGetData($tValues, 1, ($j - 1) * 2 + 1) / DllStructGetData($tValues, 1, ($j - 1) * 2 + 2)
  2333. Next
  2334. Case 3, 4, 9
  2335. For $j = 1 To $iValues
  2336. $aValues[$j] = DllStructGetData($tValues, 1, $j)
  2337. Next
  2338. Case Else
  2339. $aValues[1] = DllStructGetData($tValues, 1)
  2340. EndSwitch
  2341. Return $aValues
  2342. EndFunc ;==>_GDIPlus_ImageGetPropertyItem
  2343. ; #FUNCTION# ====================================================================================================================
  2344. ; Author ........: rover
  2345. ; Modified.......: jpm
  2346. ; ===============================================================================================================================
  2347. Func _GDIPlus_ImageGetRawFormat($hImage)
  2348. Local $aGuid[2]
  2349. If ($hImage = -1) Or (Not $hImage) Then Return SetError(11, 0, $aGuid)
  2350. Local $aImageType[11][2] = _
  2351. [["UNDEFINED", $GDIP_IMAGEFORMAT_UNDEFINED], _
  2352. ["MEMORYBMP", $GDIP_IMAGEFORMAT_MEMORYBMP], _
  2353. ["BMP", $GDIP_IMAGEFORMAT_BMP], _
  2354. ["EMF", $GDIP_IMAGEFORMAT_EMF], _
  2355. ["WMF", $GDIP_IMAGEFORMAT_WMF], _
  2356. ["JPEG", $GDIP_IMAGEFORMAT_JPEG], _
  2357. ["PNG", $GDIP_IMAGEFORMAT_PNG], _
  2358. ["GIF", $GDIP_IMAGEFORMAT_GIF], _
  2359. ["TIFF", $GDIP_IMAGEFORMAT_TIFF], _
  2360. ["EXIF", $GDIP_IMAGEFORMAT_EXIF], _
  2361. ["ICON", $GDIP_IMAGEFORMAT_ICON]]
  2362. Local $tStruct = DllStructCreate("byte[16]")
  2363. Local $aResult1 = DllCall($__g_hGDIPDll, "int", "GdipGetImageRawFormat", "handle", $hImage, "struct*", $tStruct)
  2364. If @error Then Return SetError(@error, @extended, $aGuid)
  2365. If $aResult1[0] Then Return SetError(10, $aResult1[0], $aGuid)
  2366. Local $sResult2 = _WinAPI_StringFromGUID($aResult1[2])
  2367. If @error Then Return SetError(@error + 20, @extended, $aGuid)
  2368. If $sResult2 = "" Then Return SetError(12, 0, $aGuid)
  2369. For $i = 0 To 10
  2370. If $aImageType[$i][1] == $sResult2 Then
  2371. $aGuid[0] = $aImageType[$i][1]
  2372. $aGuid[1] = $aImageType[$i][0]
  2373. Return $aGuid
  2374. EndIf
  2375. Next
  2376. Return SetError(13, 0, $aGuid)
  2377. EndFunc ;==>_GDIPlus_ImageGetRawFormat
  2378. ; #FUNCTION# ====================================================================================================================
  2379. ; Author ........: UEZ
  2380. ; Modified.......: jpm
  2381. ; ===============================================================================================================================
  2382. Func _GDIPlus_ImageGetThumbnail($hImage, $iWidth = 0, $iHeight = 0, $bKeepRatio = True, $hCallback = Null, $hCallbackData = Null)
  2383. If $bKeepRatio Then
  2384. Local $aImgDim = _GDIPlus_ImageGetDimension($hImage)
  2385. If @error Then Return SetError(@error + 20, @extended, False)
  2386. Local $f
  2387. If $iWidth < 1 Or $iHeight < 1 Then
  2388. $iWidth = 0
  2389. $iHeight = 0
  2390. Else
  2391. If ($aImgDim[0] / $aImgDim[1]) > 1 Then
  2392. $f = $aImgDim[0] / $iWidth
  2393. Else
  2394. $f = $aImgDim[1] / $iHeight
  2395. EndIf
  2396. $iWidth = Int($aImgDim[0] / $f)
  2397. $iHeight = Int($aImgDim[1] / $f)
  2398. EndIf
  2399. EndIf
  2400. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageThumbnail", "handle", $hImage, "uint", $iWidth, "uint", $iHeight, "ptr*", 0, "ptr", $hCallback, "ptr", $hCallbackData)
  2401. If @error Then Return SetError(@error, @extended, False)
  2402. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2403. Return $aResult[4]
  2404. EndFunc ;==>_GDIPlus_ImageGetThumbnail
  2405. ; #FUNCTION# ====================================================================================================================
  2406. ; Author ........: rover
  2407. ; Modified.......: jpm
  2408. ; ===============================================================================================================================
  2409. Func _GDIPlus_ImageGetType($hImage)
  2410. If ($hImage = -1) Or (Not $hImage) Then Return SetError(11, 0, -1)
  2411. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageType", "handle", $hImage, "int*", 0)
  2412. If @error Then Return SetError(@error, @extended, -1)
  2413. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  2414. Return $aResult[2]
  2415. EndFunc ;==>_GDIPlus_ImageGetType
  2416. ; #FUNCTION# ====================================================================================================================
  2417. ; Author ........: rover
  2418. ; Modified.......: jpm
  2419. ; ===============================================================================================================================
  2420. Func _GDIPlus_ImageGetVerticalResolution($hImage)
  2421. If ($hImage = -1) Or (Not $hImage) Then Return SetError(11, 0, 0)
  2422. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageVerticalResolution", "handle", $hImage, "float*", 0)
  2423. If @error Then Return SetError(@error, @extended, 0)
  2424. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2425. Return Round($aResult[2])
  2426. EndFunc ;==>_GDIPlus_ImageGetVerticalResolution
  2427. ; #FUNCTION# ====================================================================================================================
  2428. ; Author ........: Paul Campbell (PaulIA)
  2429. ; Modified.......: Gary Frost
  2430. ; ===============================================================================================================================
  2431. Func _GDIPlus_ImageGetWidth($hImage)
  2432. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImageWidth", "handle", $hImage, "uint*", -1)
  2433. If @error Then Return SetError(@error, @extended, -1)
  2434. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  2435. Return $aResult[2]
  2436. EndFunc ;==>_GDIPlus_ImageGetWidth
  2437. ; #FUNCTION# ====================================================================================================================
  2438. ; Author ........: Paul Campbell (PaulIA)
  2439. ; Modified.......: Gary Frost/martin
  2440. ; ===============================================================================================================================
  2441. Func _GDIPlus_ImageLoadFromFile($sFileName)
  2442. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipLoadImageFromFile", "wstr", $sFileName, "handle*", 0)
  2443. If @error Then Return SetError(@error, @extended, 0)
  2444. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2445. Return $aResult[2]
  2446. EndFunc ;==>_GDIPlus_ImageLoadFromFile
  2447. ; #FUNCTION# ====================================================================================================================
  2448. ; Author ........: Authenticity
  2449. ; Modified.......: UEZ
  2450. ; ===============================================================================================================================
  2451. Func _GDIPlus_ImageLoadFromStream($pStream)
  2452. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipLoadImageFromStream", "ptr", $pStream, "handle*", 0)
  2453. If @error Then Return SetError(@error, @extended, 0)
  2454. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2455. Return $aResult[2]
  2456. EndFunc ;==>_GDIPlus_ImageLoadFromStream
  2457. ; #FUNCTION# ====================================================================================================================
  2458. ; Author ........: Authenticity
  2459. ; Modified.......: UEZ
  2460. ; ===============================================================================================================================
  2461. Func _GDIPlus_ImageRotateFlip($hImage, $iRotateFlipType)
  2462. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipImageRotateFlip", "handle", $hImage, "int", $iRotateFlipType)
  2463. If @error Then Return SetError(@error, @extended, False)
  2464. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2465. Return True
  2466. EndFunc ;==>_GDIPlus_ImageRotateFlip
  2467. ; #FUNCTION# ====================================================================================================================
  2468. ; Author ........: Authenticity
  2469. ; Modified ......: Eukalyptus
  2470. ; ===============================================================================================================================
  2471. Func _GDIPlus_ImageSaveAdd($hImage, $tParams)
  2472. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSaveAdd", "handle", $hImage, "struct*", $tParams)
  2473. If @error Then Return SetError(@error, @extended, False)
  2474. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2475. Return True
  2476. EndFunc ;==>_GDIPlus_ImageSaveAdd
  2477. ; #FUNCTION# ====================================================================================================================
  2478. ; Author ........: Authenticity
  2479. ; Modified ......: Eukalyptus
  2480. ; ===============================================================================================================================
  2481. Func _GDIPlus_ImageSaveAddImage($hImage, $hImageNew, $tParams)
  2482. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSaveAddImage", "handle", $hImage, "handle", $hImageNew, "struct*", $tParams)
  2483. If @error Then Return SetError(@error, @extended, False)
  2484. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2485. Return True
  2486. EndFunc ;==>_GDIPlus_ImageSaveAddImage
  2487. ; #FUNCTION# ====================================================================================================================
  2488. ; Author ........: Paul Campbell (PaulIA)
  2489. ; Modified.......: Gary Frost
  2490. ; ===============================================================================================================================
  2491. Func _GDIPlus_ImageSaveToFile($hImage, $sFileName)
  2492. Local $sExt = __GDIPlus_ExtractFileExt($sFileName)
  2493. Local $sCLSID = _GDIPlus_EncodersGetCLSID($sExt)
  2494. If $sCLSID = "" Then Return SetError(-1, 0, False)
  2495. Local $bRet = _GDIPlus_ImageSaveToFileEx($hImage, $sFileName, $sCLSID, 0)
  2496. Return SetError(@error, @extended, $bRet)
  2497. EndFunc ;==>_GDIPlus_ImageSaveToFile
  2498. ; #FUNCTION# ====================================================================================================================
  2499. ; Author ........: Paul Campbell (PaulIA)
  2500. ; Modified.......: Gary Frost, jpm
  2501. ; ===============================================================================================================================
  2502. Func _GDIPlus_ImageSaveToFileEx($hImage, $sFileName, $sEncoder, $tParams = 0)
  2503. Local $tGUID = _WinAPI_GUIDFromString($sEncoder)
  2504. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSaveImageToFile", "handle", $hImage, "wstr", $sFileName, "struct*", $tGUID, "struct*", $tParams)
  2505. If @error Then Return SetError(@error, @extended, False)
  2506. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2507. Return True
  2508. EndFunc ;==>_GDIPlus_ImageSaveToFileEx
  2509. ; #FUNCTION# ====================================================================================================================
  2510. ; Author ........: Authenticity
  2511. ; Modified.......: UEZ, jpm
  2512. ; ===============================================================================================================================
  2513. Func _GDIPlus_ImageSaveToStream($hImage, $pStream, $tEncoder, $tParams = 0)
  2514. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSaveImageToStream", "handle", $hImage, "ptr", $pStream, "struct*", $tEncoder, "struct*", $tParams)
  2515. If @error Then Return SetError(@error, @extended, False)
  2516. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2517. Return True
  2518. EndFunc ;==>_GDIPlus_ImageSaveToStream
  2519. ; #FUNCTION# ====================================================================================================================
  2520. ; Author ........: UEZ
  2521. ; Modified ......:
  2522. ; ===============================================================================================================================
  2523. Func _GDIPlus_ImageScale($hImage, $iScaleW, $iScaleH, $iInterpolationMode = $GDIP_INTERPOLATIONMODE_HIGHQUALITYBICUBIC)
  2524. Local $iWidth = _GDIPlus_ImageGetWidth($hImage) * $iScaleW
  2525. If @error Then Return SetError(1, 0, 0)
  2526. Local $iHeight = _GDIPlus_ImageGetHeight($hImage) * $iScaleH
  2527. If @error Then Return SetError(2, 0, 0)
  2528. Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight)
  2529. If @error Then Return SetError(3, 0, 0)
  2530. Local $hBmpCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
  2531. If @error Then
  2532. _GDIPlus_BitmapDispose($hBitmap)
  2533. Return SetError(4, 0, 0)
  2534. EndIf
  2535. _GDIPlus_GraphicsSetInterpolationMode($hBmpCtxt, $iInterpolationMode)
  2536. If @error Then
  2537. _GDIPlus_GraphicsDispose($hBmpCtxt)
  2538. _GDIPlus_BitmapDispose($hBitmap)
  2539. Return SetError(5, 0, 0)
  2540. EndIf
  2541. _GDIPlus_GraphicsDrawImageRect($hBmpCtxt, $hImage, 0, 0, $iWidth, $iHeight)
  2542. If @error Then
  2543. _GDIPlus_GraphicsDispose($hBmpCtxt)
  2544. _GDIPlus_BitmapDispose($hBitmap)
  2545. Return SetError(6, 0, 0)
  2546. EndIf
  2547. _GDIPlus_GraphicsDispose($hBmpCtxt)
  2548. Return $hBitmap
  2549. EndFunc ;==>_GDIPlus_ImageScale
  2550. ; #FUNCTION# ====================================================================================================================
  2551. ; Author ........: UEZ
  2552. ; Modified ......: Eukalyptus
  2553. ; ===============================================================================================================================
  2554. Func _GDIPlus_ImageSelectActiveFrame($hImage, $sDimensionID, $iFrameIndex)
  2555. Local $tGUID = _WinAPI_GUIDFromString($sDimensionID)
  2556. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipImageSelectActiveFrame", "handle", $hImage, "struct*", $tGUID, "uint", $iFrameIndex)
  2557. If @error Then Return SetError(@error, @extended, False)
  2558. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2559. Return True
  2560. EndFunc ;==>_GDIPlus_ImageSelectActiveFrame
  2561. ; #FUNCTION# ====================================================================================================================
  2562. ; Author ........: UEZ
  2563. ; Modified ......:
  2564. ; ===============================================================================================================================
  2565. Func _GDIPlus_ImageResize($hImage, $iNewWidth, $iNewHeight, $iInterpolationMode = $GDIP_INTERPOLATIONMODE_HIGHQUALITYBICUBIC)
  2566. Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iNewWidth, $iNewHeight)
  2567. If @error Then Return SetError(1, 0, 0)
  2568. Local $hBmpCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
  2569. If @error Then
  2570. _GDIPlus_BitmapDispose($hBitmap)
  2571. Return SetError(2, @extended, 0)
  2572. EndIf
  2573. _GDIPlus_GraphicsSetInterpolationMode($hBmpCtxt, $iInterpolationMode)
  2574. If @error Then
  2575. _GDIPlus_GraphicsDispose($hBmpCtxt)
  2576. _GDIPlus_BitmapDispose($hBitmap)
  2577. Return SetError(3, @extended, 0)
  2578. EndIf
  2579. _GDIPlus_GraphicsDrawImageRect($hBmpCtxt, $hImage, 0, 0, $iNewWidth, $iNewHeight)
  2580. If @error Then
  2581. _GDIPlus_GraphicsDispose($hBmpCtxt)
  2582. _GDIPlus_BitmapDispose($hBitmap)
  2583. Return SetError(4, @extended, 0)
  2584. EndIf
  2585. _GDIPlus_GraphicsDispose($hBmpCtxt)
  2586. Return $hBitmap
  2587. EndFunc ;==>_GDIPlus_ImageResize
  2588. ; #FUNCTION# ====================================================================================================================
  2589. ; Author ........: Authenticity
  2590. ; Modified.......: UEZ
  2591. ; ===============================================================================================================================
  2592. Func _GDIPlus_LineBrushCreate($nX1, $nY1, $nX2, $nY2, $iARGBClr1, $iARGBClr2, $iWrapMode = 0)
  2593. Local $tPointF1, $tPointF2, $aResult
  2594. $tPointF1 = DllStructCreate("float;float")
  2595. $tPointF2 = DllStructCreate("float;float")
  2596. DllStructSetData($tPointF1, 1, $nX1)
  2597. DllStructSetData($tPointF1, 2, $nY1)
  2598. DllStructSetData($tPointF2, 1, $nX2)
  2599. DllStructSetData($tPointF2, 2, $nY2)
  2600. $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateLineBrush", "struct*", $tPointF1, "struct*", $tPointF2, "uint", $iARGBClr1, "uint", $iARGBClr2, "int", $iWrapMode, "handle*", 0)
  2601. If @error Then Return SetError(@error, @extended, 0)
  2602. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2603. Return $aResult[6]
  2604. EndFunc ;==>_GDIPlus_LineBrushCreate
  2605. ; #FUNCTION# ====================================================================================================================
  2606. ; Author ........: Authenticity
  2607. ; Modified.......: Eukalyptus
  2608. ; ===============================================================================================================================
  2609. Func _GDIPlus_LineBrushCreateFromRect($tRECTF, $iARGBClr1, $iARGBClr2, $iGradientMode = 0, $iWrapMode = 0)
  2610. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateLineBrushFromRect", "struct*", $tRECTF, "uint", $iARGBClr1, "uint", $iARGBClr2, "int", $iGradientMode, "int", $iWrapMode, "handle*", 0)
  2611. If @error Then Return SetError(@error, @extended, 0)
  2612. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2613. Return $aResult[6]
  2614. EndFunc ;==>_GDIPlus_LineBrushCreateFromRect
  2615. ; #FUNCTION# ====================================================================================================================
  2616. ; Author ........: Authenticity
  2617. ; Modified.......: Eukalyptus
  2618. ; ===============================================================================================================================
  2619. Func _GDIPlus_LineBrushCreateFromRectWithAngle($tRECTF, $iARGBClr1, $iARGBClr2, $fAngle, $bIsAngleScalable = True, $iWrapMode = 0)
  2620. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateLineBrushFromRectWithAngle", "struct*", $tRECTF, "uint", $iARGBClr1, "uint", $iARGBClr2, "float", $fAngle, "int", $bIsAngleScalable, "int", $iWrapMode, "handle*", 0)
  2621. If @error Then Return SetError(@error, @extended, 0)
  2622. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2623. Return $aResult[7]
  2624. EndFunc ;==>_GDIPlus_LineBrushCreateFromRectWithAngle
  2625. ; #FUNCTION# ====================================================================================================================
  2626. ; Author ........: Authenticity
  2627. ; Modified.......: UEZ
  2628. ; ===============================================================================================================================
  2629. Func _GDIPlus_LineBrushGetColors($hLineGradientBrush)
  2630. Local $tARGBs, $aARGBs[2], $aResult
  2631. $tARGBs = DllStructCreate("uint;uint")
  2632. $aResult = DllCall($__g_hGDIPDll, "uint", "GdipGetLineColors", "handle", $hLineGradientBrush, "struct*", $tARGBs)
  2633. If @error Then Return SetError(@error, @extended, -1)
  2634. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  2635. $aARGBs[0] = DllStructGetData($tARGBs, 1)
  2636. $aARGBs[1] = DllStructGetData($tARGBs, 2)
  2637. Return $aARGBs
  2638. EndFunc ;==>_GDIPlus_LineBrushGetColors
  2639. ; #FUNCTION# ====================================================================================================================
  2640. ; Author ........: Authenticity
  2641. ; Modified.......: Eukalyptus, jpm
  2642. ; ===============================================================================================================================
  2643. Func _GDIPlus_LineBrushGetRect($hLineGradientBrush)
  2644. Local $tRECTF = DllStructCreate($tagGDIPRECTF)
  2645. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetLineRect", "handle", $hLineGradientBrush, "struct*", $tRECTF)
  2646. If @error Then Return SetError(@error, @extended, -1)
  2647. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  2648. Local $aRectF[4]
  2649. For $iI = 1 To 4
  2650. $aRectF[$iI - 1] = DllStructGetData($tRECTF, $iI)
  2651. Next
  2652. Return $aRectF
  2653. EndFunc ;==>_GDIPlus_LineBrushGetRect
  2654. ; #FUNCTION# ====================================================================================================================
  2655. ; Author ........: Authenticity
  2656. ; Modified.......: Eukalyptus
  2657. ; ===============================================================================================================================
  2658. Func _GDIPlus_LineBrushMultiplyTransform($hLineGradientBrush, $hMatrix, $iOrder = 0)
  2659. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipMultiplyLineTransform", "handle", $hLineGradientBrush, "handle", $hMatrix, "int", $iOrder)
  2660. If @error Then Return SetError(@error, @extended, False)
  2661. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2662. Return True
  2663. EndFunc ;==>_GDIPlus_LineBrushMultiplyTransform
  2664. ; #FUNCTION# ====================================================================================================================
  2665. ; Author ........: Authenticity
  2666. ; Modified.......: Eukalyptus
  2667. ; ===============================================================================================================================
  2668. Func _GDIPlus_LineBrushResetTransform($hLineGradientBrush)
  2669. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipResetLineTransform", "handle", $hLineGradientBrush)
  2670. If @error Then Return SetError(@error, @extended, False)
  2671. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2672. Return True
  2673. EndFunc ;==>_GDIPlus_LineBrushResetTransform
  2674. ; #FUNCTION# ====================================================================================================================
  2675. ; Author ........: Authenticity
  2676. ; Modified.......: UEZ
  2677. ; ===============================================================================================================================
  2678. Func _GDIPlus_LineBrushSetBlend($hLineGradientBrush, $aBlends)
  2679. Local $iI, $iCount, $tFactors, $tPositions, $aResult
  2680. $iCount = $aBlends[0][0]
  2681. $tFactors = DllStructCreate("float[" & $iCount & "]")
  2682. $tPositions = DllStructCreate("float[" & $iCount & "]")
  2683. For $iI = 1 To $iCount
  2684. DllStructSetData($tFactors, 1, $aBlends[$iI][0], $iI)
  2685. DllStructSetData($tPositions, 1, $aBlends[$iI][1], $iI)
  2686. Next
  2687. $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetLineBlend", "handle", $hLineGradientBrush, "struct*", $tFactors, "struct*", $tPositions, "int", $iCount)
  2688. If @error Then Return SetError(@error, @extended, False)
  2689. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2690. Return True
  2691. EndFunc ;==>_GDIPlus_LineBrushSetBlend
  2692. ; #FUNCTION# ====================================================================================================================
  2693. ; Author ........: Authenticity
  2694. ; Modified.......: UEZ
  2695. ; ===============================================================================================================================
  2696. Func _GDIPlus_LineBrushSetColors($hLineGradientBrush, $iARGBStart, $iARGBEnd)
  2697. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetLineColors", "handle", $hLineGradientBrush, "uint", $iARGBStart, "uint", $iARGBEnd)
  2698. If @error Then Return SetError(@error, @extended, False)
  2699. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2700. Return True
  2701. EndFunc ;==>_GDIPlus_LineBrushSetColors
  2702. ; #FUNCTION# ====================================================================================================================
  2703. ; Author ........: Authenticity
  2704. ; Modified.......: UEZ
  2705. ; ===============================================================================================================================
  2706. Func _GDIPlus_LineBrushSetGammaCorrection($hLineGradientBrush, $bUseGammaCorrection = True)
  2707. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetLineGammaCorrection", "handle", $hLineGradientBrush, "int", $bUseGammaCorrection)
  2708. If @error Then Return SetError(@error, @extended, False)
  2709. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2710. Return True
  2711. EndFunc ;==>_GDIPlus_LineBrushSetGammaCorrection
  2712. ; #FUNCTION# ====================================================================================================================
  2713. ; Author ........: Authenticity
  2714. ; Modified.......: Eukalyptus
  2715. ; ===============================================================================================================================
  2716. Func _GDIPlus_LineBrushSetLinearBlend($hLineGradientBrush, $fFocus, $fScale = 1)
  2717. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetLineLinearBlend", "handle", $hLineGradientBrush, "float", $fFocus, "float", $fScale)
  2718. If @error Then Return SetError(@error, @extended, False)
  2719. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2720. Return True
  2721. EndFunc ;==>_GDIPlus_LineBrushSetLinearBlend
  2722. ; #FUNCTION# ====================================================================================================================
  2723. ; Author ........: Authenticity
  2724. ; Modified.......: UEZ
  2725. ; ===============================================================================================================================
  2726. Func _GDIPlus_LineBrushSetPresetBlend($hLineGradientBrush, $aInterpolations)
  2727. Local $iI, $iCount, $tColors, $tPositions, $aResult
  2728. $iCount = $aInterpolations[0][0]
  2729. $tColors = DllStructCreate("uint[" & $iCount & "]")
  2730. $tPositions = DllStructCreate("float[" & $iCount & "]")
  2731. For $iI = 1 To $iCount
  2732. DllStructSetData($tColors, 1, $aInterpolations[$iI][0], $iI)
  2733. DllStructSetData($tPositions, 1, $aInterpolations[$iI][1], $iI)
  2734. Next
  2735. $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetLinePresetBlend", "handle", $hLineGradientBrush, "struct*", $tColors, "struct*", $tPositions, "int", $iCount)
  2736. If @error Then Return SetError(@error, @extended, False)
  2737. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2738. Return True
  2739. EndFunc ;==>_GDIPlus_LineBrushSetPresetBlend
  2740. ; #FUNCTION# ====================================================================================================================
  2741. ; Author ........: Authenticity
  2742. ; Modified.......: UEZ
  2743. ; ===============================================================================================================================
  2744. Func _GDIPlus_LineBrushSetSigmaBlend($hLineGradientBrush, $fFocus, $fScale = 1)
  2745. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetLineSigmaBlend", "handle", $hLineGradientBrush, "float", $fFocus, "float", $fScale)
  2746. If @error Then Return SetError(@error, @extended, False)
  2747. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2748. Return True
  2749. EndFunc ;==>_GDIPlus_LineBrushSetSigmaBlend
  2750. ; #FUNCTION# ====================================================================================================================
  2751. ; Author ........: Authenticity
  2752. ; Modified.......: Eukalyptus
  2753. ; ===============================================================================================================================
  2754. Func _GDIPlus_LineBrushSetTransform($hLineGradientBrush, $hMatrix)
  2755. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetLineTransform", "handle", $hLineGradientBrush, "handle", $hMatrix)
  2756. If @error Then Return SetError(@error, @extended, False)
  2757. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2758. Return True
  2759. EndFunc ;==>_GDIPlus_LineBrushSetTransform
  2760. ; #FUNCTION# ====================================================================================================================
  2761. ; Author ........: Paul Campbell (PaulIA)
  2762. ; Modified.......: Gary Frost
  2763. ; ===============================================================================================================================
  2764. Func _GDIPlus_MatrixCreate()
  2765. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateMatrix", "handle*", 0)
  2766. If @error Then Return SetError(@error, @extended, 0)
  2767. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2768. Return $aResult[1]
  2769. EndFunc ;==>_GDIPlus_MatrixCreate
  2770. ; #FUNCTION# ====================================================================================================================
  2771. ; Author ........: Eukalyptus
  2772. ; Modified ......: UEZ
  2773. ; ===============================================================================================================================
  2774. Func _GDIPlus_MatrixCreate2($nM11 = 1, $nM12 = 1, $nM21 = 1, $nM22 = 1, $nDX = 0, $nDY = 0)
  2775. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateMatrix2", "float", $nM11, "float", $nM12, "float", $nM21, "float", $nM22, "float", $nDX, "float", $nDY, "handle*", 0)
  2776. If @error Then Return SetError(@error, @extended, 0)
  2777. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2778. Return $aResult[7]
  2779. EndFunc ;==>_GDIPlus_MatrixCreate2
  2780. ; #FUNCTION# ====================================================================================================================
  2781. ; Author ........: Authenticity
  2782. ; Modified.......: Eukalyptus, jpm
  2783. ; ===============================================================================================================================
  2784. Func _GDIPlus_MatrixClone($hMatrix)
  2785. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCloneMatrix", "handle", $hMatrix, "handle*", 0)
  2786. If @error Then Return SetError(@error, @extended, 0)
  2787. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  2788. Return $aResult[2]
  2789. EndFunc ;==>_GDIPlus_MatrixClone
  2790. ; #FUNCTION# ====================================================================================================================
  2791. ; Author ........: Paul Campbell (PaulIA)
  2792. ; Modified.......: Gary Frost
  2793. ; ===============================================================================================================================
  2794. Func _GDIPlus_MatrixDispose($hMatrix)
  2795. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeleteMatrix", "handle", $hMatrix)
  2796. If @error Then Return SetError(@error, @extended, False)
  2797. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2798. Return True
  2799. EndFunc ;==>_GDIPlus_MatrixDispose
  2800. ; #FUNCTION# ====================================================================================================================
  2801. ; Author ........: Authenticity
  2802. ; Modified.......: Eukalyptus
  2803. ; ===============================================================================================================================
  2804. Func _GDIPlus_MatrixGetElements($hMatrix)
  2805. Local $tElements = DllStructCreate("float[6]")
  2806. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetMatrixElements", "handle", $hMatrix, "struct*", $tElements)
  2807. If @error Then Return SetError(@error, @extended, -1)
  2808. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  2809. Local $aElements[6]
  2810. For $iI = 1 To 6
  2811. $aElements[$iI - 1] = DllStructGetData($tElements, 1, $iI)
  2812. Next
  2813. Return $aElements
  2814. EndFunc ;==>_GDIPlus_MatrixGetElements
  2815. ; #FUNCTION# ====================================================================================================================
  2816. ; Author ........: Authenticity
  2817. ; Modified.......: Eukalyptus
  2818. ; ===============================================================================================================================
  2819. Func _GDIPlus_MatrixInvert($hMatrix)
  2820. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipInvertMatrix", "handle", $hMatrix)
  2821. If @error Then Return SetError(@error, @extended, False)
  2822. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2823. Return True
  2824. EndFunc ;==>_GDIPlus_MatrixInvert
  2825. ; #FUNCTION# ====================================================================================================================
  2826. ; Author ........: Authenticity
  2827. ; Modified.......: Eukalyptus
  2828. ; ===============================================================================================================================
  2829. Func _GDIPlus_MatrixMultiply($hMatrix1, $hMatrix2, $iOrder = 0)
  2830. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipMultiplyMatrix", "handle", $hMatrix1, "handle", $hMatrix2, "int", $iOrder)
  2831. If @error Then Return SetError(@error, @extended, False)
  2832. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2833. Return True
  2834. EndFunc ;==>_GDIPlus_MatrixMultiply
  2835. ; #FUNCTION# ====================================================================================================================
  2836. ; Author ........: Paul Campbell (PaulIA)
  2837. ; Modified.......: Gary Frost
  2838. ; ===============================================================================================================================
  2839. Func _GDIPlus_MatrixRotate($hMatrix, $fAngle, $bAppend = False)
  2840. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipRotateMatrix", "handle", $hMatrix, "float", $fAngle, "int", $bAppend)
  2841. If @error Then Return SetError(@error, @extended, False)
  2842. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2843. Return True
  2844. EndFunc ;==>_GDIPlus_MatrixRotate
  2845. ; #FUNCTION# ====================================================================================================================
  2846. ; Author ........: monoceres
  2847. ; Modified.......:
  2848. ; ===============================================================================================================================
  2849. Func _GDIPlus_MatrixScale($hMatrix, $fScaleX, $fScaleY, $bOrder = False)
  2850. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipScaleMatrix", "handle", $hMatrix, "float", $fScaleX, "float", $fScaleY, "int", $bOrder)
  2851. If @error Then Return SetError(@error, @extended, False)
  2852. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2853. Return True
  2854. EndFunc ;==>_GDIPlus_MatrixScale
  2855. ; #FUNCTION# ====================================================================================================================
  2856. ; Author ........: Authenticity
  2857. ; Modified.......: Eukalyptus
  2858. ; ===============================================================================================================================
  2859. Func _GDIPlus_MatrixSetElements($hMatrix, $nM11 = 1, $nM12 = 0, $nM21 = 0, $nM22 = 1, $nDX = 0, $nDY = 0)
  2860. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetMatrixElements", "handle", $hMatrix, "float", $nM11, "float", $nM12, _
  2861. "float", $nM21, "float", $nM22, "float", $nDX, "float", $nDY)
  2862. If @error Then Return SetError(@error, @extended, False)
  2863. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2864. Return True
  2865. EndFunc ;==>_GDIPlus_MatrixSetElements
  2866. ; #FUNCTION# ====================================================================================================================
  2867. ; Author ........: Authenticity
  2868. ; Modified.......: Eukalyptus
  2869. ; ===============================================================================================================================
  2870. Func _GDIPlus_MatrixShear($hMatrix, $fShearX, $fShearY, $iOrder = 0)
  2871. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipShearMatrix", "handle", $hMatrix, "float", $fShearX, "float", $fShearY, "int", $iOrder)
  2872. If @error Then Return SetError(@error, @extended, False)
  2873. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2874. Return True
  2875. EndFunc ;==>_GDIPlus_MatrixShear
  2876. ; #FUNCTION# ====================================================================================================================
  2877. ; Author ........: Authenticity
  2878. ; Modified.......: Eukalyptus
  2879. ; ===============================================================================================================================
  2880. Func _GDIPlus_MatrixTransformPoints($hMatrix, ByRef $aPoints)
  2881. Local $iCount = $aPoints[0][0]
  2882. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  2883. For $iI = 1 To $iCount
  2884. DllStructSetData($tPoints, 1, $aPoints[$iI][0], ($iI - 1) * 2 + 1)
  2885. DllStructSetData($tPoints, 1, $aPoints[$iI][1], ($iI - 1) * 2 + 2)
  2886. Next
  2887. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipTransformMatrixPoints", "handle", $hMatrix, "struct*", $tPoints, "int", $iCount)
  2888. If @error Then Return SetError(@error, @extended, False)
  2889. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2890. For $iI = 1 To $iCount
  2891. $aPoints[$iI][0] = DllStructGetData($tPoints, 1, ($iI - 1) * 2 + 1)
  2892. $aPoints[$iI][1] = DllStructGetData($tPoints, 1, ($iI - 1) * 2 + 2)
  2893. Next
  2894. Return True
  2895. EndFunc ;==>_GDIPlus_MatrixTransformPoints
  2896. ; #FUNCTION# ====================================================================================================================
  2897. ; Author ........: monoceres
  2898. ; Modified.......:
  2899. ; ===============================================================================================================================
  2900. Func _GDIPlus_MatrixTranslate($hMatrix, $fOffsetX, $fOffsetY, $bAppend = False)
  2901. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipTranslateMatrix", "handle", $hMatrix, "float", $fOffsetX, "float", $fOffsetY, "int", $bAppend)
  2902. If @error Then Return SetError(@error, @extended, False)
  2903. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2904. Return True
  2905. EndFunc ;==>_GDIPlus_MatrixTranslate
  2906. ; #FUNCTION# ====================================================================================================================
  2907. ; Author ........: Paul Campbell (PaulIA)
  2908. ; Modified.......: jpm
  2909. ; ===============================================================================================================================
  2910. Func _GDIPlus_ParamAdd(ByRef $tParams, $sGUID, $iNbOfValues, $iType, $pValues)
  2911. Local $iCount = DllStructGetData($tParams, "Count")
  2912. Local $pGUID = DllStructGetPtr($tParams, "GUID") + ($iCount * _GDIPlus_ParamSize())
  2913. Local $tParam = DllStructCreate($tagGDIPENCODERPARAM, $pGUID)
  2914. _WinAPI_GUIDFromStringEx($sGUID, $pGUID)
  2915. DllStructSetData($tParam, "Type", $iType)
  2916. DllStructSetData($tParam, "NumberOfValues", $iNbOfValues)
  2917. DllStructSetData($tParam, "Values", $pValues)
  2918. DllStructSetData($tParams, "Count", $iCount + 1)
  2919. EndFunc ;==>_GDIPlus_ParamAdd
  2920. ; #FUNCTION# ====================================================================================================================
  2921. ; Author ........: Paul Campbell (PaulIA)
  2922. ; Modified.......: jpm
  2923. ; ===============================================================================================================================
  2924. Func _GDIPlus_ParamInit($iCount)
  2925. Local $sStruct = $tagGDIPENCODERPARAMS
  2926. For $i = 2 To $iCount
  2927. $sStruct &= ";struct;byte[16];ulong;ulong;ptr;endstruct"
  2928. Next
  2929. Return DllStructCreate($sStruct)
  2930. EndFunc ;==>_GDIPlus_ParamInit
  2931. ; #FUNCTION# ====================================================================================================================
  2932. ; Author ........: jpm
  2933. ; Modified.......:
  2934. ; ===============================================================================================================================
  2935. Func _GDIPlus_ParamSize()
  2936. Local $tParam = DllStructCreate($tagGDIPENCODERPARAM)
  2937. Return DllStructGetSize($tParam)
  2938. EndFunc ;==>_GDIPlus_ParamSize
  2939. ; #FUNCTION# ====================================================================================================================
  2940. ; Author ........: Authenticity
  2941. ; Modified.......: Eukalyptus, jpm
  2942. ; ===============================================================================================================================
  2943. Func _GDIPlus_PathAddArc($hPath, $nX, $nY, $nWidth, $nHeight, $fStartAngle, $fSweepAngle)
  2944. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathArc", "handle", $hPath, "float", $nX, "float", $nY, _
  2945. "float", $nWidth, "float", $nHeight, "float", $fStartAngle, "float", $fSweepAngle)
  2946. If @error Then Return SetError(@error, @extended, False)
  2947. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2948. Return True
  2949. EndFunc ;==>_GDIPlus_PathAddArc
  2950. ; #FUNCTION# ====================================================================================================================
  2951. ; Author ........: Authenticity
  2952. ; Modified.......: Eukalyptus, jpm
  2953. ; ===============================================================================================================================
  2954. Func _GDIPlus_PathAddBezier($hPath, $nX1, $nY1, $nX2, $nY2, $nX3, $nY3, $nX4, $nY4)
  2955. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathBezier", "handle", $hPath, "float", $nX1, "float", $nY1, "float", $nX2, "float", $nY2, "float", $nX3, "float", $nY3, "float", $nX4, "float", $nY4)
  2956. If @error Then Return SetError(@error, @extended, False)
  2957. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2958. Return True
  2959. EndFunc ;==>_GDIPlus_PathAddBezier
  2960. ; #FUNCTION# ====================================================================================================================
  2961. ; Author ........: Authenticity
  2962. ; Modified.......: Eukalyptus
  2963. ; ===============================================================================================================================
  2964. Func _GDIPlus_PathAddClosedCurve($hPath, $aPoints)
  2965. Local $iCount = $aPoints[0][0]
  2966. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  2967. For $iI = 1 To $iCount
  2968. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  2969. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  2970. Next
  2971. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathClosedCurve", "handle", $hPath, "struct*", $tPoints, "int", $iCount)
  2972. If @error Then Return SetError(@error, @extended, False)
  2973. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2974. Return True
  2975. EndFunc ;==>_GDIPlus_PathAddClosedCurve
  2976. ; #FUNCTION# ====================================================================================================================
  2977. ; Author ........: Authenticity
  2978. ; Modified.......: Eukalyptus
  2979. ; ===============================================================================================================================
  2980. Func _GDIPlus_PathAddClosedCurve2($hPath, $aPoints, $nTension = 0.5)
  2981. Local $iCount = $aPoints[0][0]
  2982. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  2983. For $iI = 1 To $iCount
  2984. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  2985. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  2986. Next
  2987. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathClosedCurve2", "handle", $hPath, "struct*", $tPoints, "int", $iCount, "float", $nTension)
  2988. If @error Then Return SetError(@error, @extended, False)
  2989. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  2990. Return True
  2991. EndFunc ;==>_GDIPlus_PathAddClosedCurve2
  2992. ; #FUNCTION# ====================================================================================================================
  2993. ; Author ........: Authenticity
  2994. ; Modified.......: Eukalyptus
  2995. ; ===============================================================================================================================
  2996. Func _GDIPlus_PathAddCurve($hPath, $aPoints)
  2997. Local $iCount = $aPoints[0][0]
  2998. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  2999. For $iI = 1 To $iCount
  3000. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  3001. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  3002. Next
  3003. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathCurve", "handle", $hPath, "struct*", $tPoints, "int", $iCount)
  3004. If @error Then Return SetError(@error, @extended, False)
  3005. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3006. Return True
  3007. EndFunc ;==>_GDIPlus_PathAddCurve
  3008. ; #FUNCTION# ====================================================================================================================
  3009. ; Author ........: Authenticity
  3010. ; Modified.......: Eukalyptus
  3011. ; ===============================================================================================================================
  3012. Func _GDIPlus_PathAddCurve2($hPath, $aPoints, $nTension = 0.5)
  3013. Local $iCount = $aPoints[0][0]
  3014. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  3015. For $iI = 1 To $iCount
  3016. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  3017. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  3018. Next
  3019. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathCurve2", "handle", $hPath, "struct*", $tPoints, "int", $iCount, "float", $nTension)
  3020. If @error Then Return SetError(@error, @extended, False)
  3021. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3022. Return True
  3023. EndFunc ;==>_GDIPlus_PathAddCurve2
  3024. ; #FUNCTION# ====================================================================================================================
  3025. ; Author ........: Authenticity
  3026. ; Modified.......: Eukalyptus
  3027. ; ===============================================================================================================================
  3028. Func _GDIPlus_PathAddCurve3($hPath, $aPoints, $iOffset, $iNumOfSegments, $nTension = 0.5)
  3029. Local $iCount = $aPoints[0][0]
  3030. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  3031. For $iI = 1 To $iCount
  3032. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  3033. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  3034. Next
  3035. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathCurve3", "handle", $hPath, "struct*", $tPoints, "int", $iCount, "int", $iOffset, "int", $iNumOfSegments, "float", $nTension)
  3036. If @error Then Return SetError(@error, @extended, False)
  3037. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3038. Return True
  3039. EndFunc ;==>_GDIPlus_PathAddCurve3
  3040. ; #FUNCTION# ====================================================================================================================
  3041. ; Author ........: Authenticity
  3042. ; Modified.......: Eukalyptus, jpm
  3043. ; ===============================================================================================================================
  3044. Func _GDIPlus_PathAddEllipse($hPath, $nX, $nY, $nWidth, $nHeight)
  3045. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathEllipse", "handle", $hPath, "float", $nX, "float", $nY, "float", $nWidth, "float", $nHeight)
  3046. If @error Then Return SetError(@error, @extended, False)
  3047. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3048. Return True
  3049. EndFunc ;==>_GDIPlus_PathAddEllipse
  3050. ; #FUNCTION# ====================================================================================================================
  3051. ; Author ........: Authenticity
  3052. ; Modified.......: Eukalyptus, jpm
  3053. ; ===============================================================================================================================
  3054. Func _GDIPlus_PathAddLine($hPath, $nX1, $nY1, $nX2, $nY2)
  3055. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathLine", "handle", $hPath, "float", $nX1, "float", $nY1, "float", $nX2, "float", $nY2)
  3056. If @error Then Return SetError(@error, @extended, False)
  3057. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3058. Return True
  3059. EndFunc ;==>_GDIPlus_PathAddLine
  3060. ; #FUNCTION# ====================================================================================================================
  3061. ; Author ........: Authenticity
  3062. ; Modified.......: UEZ
  3063. ; ===============================================================================================================================
  3064. Func _GDIPlus_PathAddLine2($hPath, $aPoints)
  3065. Local $iCount = $aPoints[0][0]
  3066. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  3067. For $iI = 1 To $iCount
  3068. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  3069. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  3070. Next
  3071. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathLine2", "handle", $hPath, "struct*", $tPoints, "int", $iCount)
  3072. If @error Then Return SetError(@error, @extended, False)
  3073. If $aResult[0] Then SetError(10, $aResult[0], False)
  3074. Return True
  3075. EndFunc ;==>_GDIPlus_PathAddLine2
  3076. ; #FUNCTION# ====================================================================================================================
  3077. ; Author ........: Authenticity
  3078. ; Modified.......: Eukalyptus
  3079. ; ===============================================================================================================================
  3080. Func _GDIPlus_PathAddPath($hPath1, $hPath2, $bConnect = True)
  3081. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathPath", "handle", $hPath1, "handle", $hPath2, "int", $bConnect)
  3082. If @error Then Return SetError(@error, @extended, False)
  3083. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3084. Return True
  3085. EndFunc ;==>_GDIPlus_PathAddPath
  3086. ; #FUNCTION# ====================================================================================================================
  3087. ; Author ........: Authenticity
  3088. ; Modified.......: Eukalyptus, jpm
  3089. ; ===============================================================================================================================
  3090. Func _GDIPlus_PathAddPie($hPath, $nX, $nY, $nWidth, $nHeight, $fStartAngle, $fSweepAngle)
  3091. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathPie", "handle", $hPath, "float", $nX, "float", $nY, _
  3092. "float", $nWidth, "float", $nHeight, "float", $fStartAngle, "float", $fSweepAngle)
  3093. If @error Then Return SetError(@error, @extended, False)
  3094. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3095. Return True
  3096. EndFunc ;==>_GDIPlus_PathAddPie
  3097. ; #FUNCTION# ====================================================================================================================
  3098. ; Author ........: Authenticity
  3099. ; Modified.......: Eukalyptus
  3100. ; ===============================================================================================================================
  3101. Func _GDIPlus_PathAddPolygon($hPath, $aPoints)
  3102. Local $iCount = $aPoints[0][0]
  3103. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  3104. For $iI = 1 To $iCount
  3105. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  3106. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  3107. Next
  3108. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathPolygon", "handle", $hPath, "struct*", $tPoints, "int", $iCount)
  3109. If @error Then Return SetError(@error, @extended, False)
  3110. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3111. Return True
  3112. EndFunc ;==>_GDIPlus_PathAddPolygon
  3113. ; #FUNCTION# ====================================================================================================================
  3114. ; Author ........: Authenticity
  3115. ; Modified.......: Eukalyptus, jpm
  3116. ; ===============================================================================================================================
  3117. Func _GDIPlus_PathAddRectangle($hPath, $nX, $nY, $nWidth, $nHeight)
  3118. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathRectangle", "handle", $hPath, "float", $nX, "float", $nY, "float", $nWidth, "float", $nHeight)
  3119. If @error Then Return SetError(@error, @extended, False)
  3120. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3121. Return True
  3122. EndFunc ;==>_GDIPlus_PathAddRectangle
  3123. ; #FUNCTION# ====================================================================================================================
  3124. ; Author ........: Authenticity
  3125. ; Modified.......: Eukalyptus
  3126. ; ===============================================================================================================================
  3127. Func _GDIPlus_PathAddString($hPath, $sString, $tLayout, $hFamily, $iStyle = 0, $fSize = 8.5, $hFormat = 0)
  3128. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipAddPathString", "handle", $hPath, "wstr", $sString, "int", -1, _
  3129. "handle", $hFamily, "int", $iStyle, "float", $fSize, "struct*", $tLayout, "handle", $hFormat)
  3130. If @error Then Return SetError(@error, @extended, False)
  3131. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3132. Return True
  3133. EndFunc ;==>_GDIPlus_PathAddString
  3134. ; #FUNCTION# ====================================================================================================================
  3135. ; Author ........: Authenticity
  3136. ; Modified.......: Eukalyptus
  3137. ; ===============================================================================================================================
  3138. Func _GDIPlus_PathBrushCreate($aPoints, $iWrapMode = 0)
  3139. Local $iCount = $aPoints[0][0]
  3140. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  3141. For $iI = 1 To $iCount
  3142. DllStructSetData($tPoints, 1, $aPoints[$iI][0], (($iI - 1) * 2) + 1)
  3143. DllStructSetData($tPoints, 1, $aPoints[$iI][1], (($iI - 1) * 2) + 2)
  3144. Next
  3145. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreatePathGradient", "struct*", $tPoints, "int", $iCount, "int", $iWrapMode, "handle*", 0)
  3146. If @error Then Return SetError(@error, @extended, 0)
  3147. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  3148. Return $aResult[4]
  3149. EndFunc ;==>_GDIPlus_PathBrushCreate
  3150. ; #FUNCTION# ====================================================================================================================
  3151. ; Author ........: Authenticity
  3152. ; Modified.......: Eukalyptus
  3153. ; ===============================================================================================================================
  3154. Func _GDIPlus_PathBrushCreateFromPath($hPath)
  3155. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreatePathGradientFromPath", "handle", $hPath, "handle*", 0)
  3156. If @error Then Return SetError(@error, @extended, 0)
  3157. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  3158. Return $aResult[2]
  3159. EndFunc ;==>_GDIPlus_PathBrushCreateFromPath
  3160. ; #FUNCTION# ====================================================================================================================
  3161. ; Author ........: Authenticity
  3162. ; Modified.......: Eukalyptus
  3163. ; ===============================================================================================================================
  3164. Func _GDIPlus_PathBrushGetCenterPoint($hPathGradientBrush)
  3165. Local $tPointF = DllStructCreate("float;float")
  3166. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPathGradientCenterPoint", "handle", $hPathGradientBrush, "struct*", $tPointF)
  3167. If @error Then Return SetError(@error, @extended, -1)
  3168. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3169. Local $aPointF[2]
  3170. $aPointF[0] = DllStructGetData($tPointF, 1)
  3171. $aPointF[1] = DllStructGetData($tPointF, 2)
  3172. Return $aPointF
  3173. EndFunc ;==>_GDIPlus_PathBrushGetCenterPoint
  3174. ; #FUNCTION# ====================================================================================================================
  3175. ; Author ........: Authenticity
  3176. ; Modified.......: Eukalyptus
  3177. ; ===============================================================================================================================
  3178. Func _GDIPlus_PathBrushGetFocusScales($hPathGradientBrush)
  3179. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPathGradientFocusScales", "handle", $hPathGradientBrush, "float*", 0, "float*", 0)
  3180. If @error Then Return SetError(@error, @extended, -1)
  3181. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3182. Local $aScales[2]
  3183. $aScales[0] = $aResult[2]
  3184. $aScales[1] = $aResult[3]
  3185. Return $aScales
  3186. EndFunc ;==>_GDIPlus_PathBrushGetFocusScales
  3187. ; #FUNCTION# ====================================================================================================================
  3188. ; Author ........: Authenticity
  3189. ; Modified.......: Eukalyptus
  3190. ; ===============================================================================================================================
  3191. Func _GDIPlus_PathBrushGetPointCount($hPathGradientBrush)
  3192. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPathGradientPointCount", "handle", $hPathGradientBrush, "int*", 0)
  3193. If @error Then Return SetError(@error, @extended, -1)
  3194. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3195. Return $aResult[2]
  3196. EndFunc ;==>_GDIPlus_PathBrushGetPointCount
  3197. ; #FUNCTION# ====================================================================================================================
  3198. ; Author ........: Authenticity
  3199. ; Modified.......: Eukalyptus
  3200. ; ===============================================================================================================================
  3201. Func _GDIPlus_PathBrushGetRect($hPathGradientBrush)
  3202. Local $tRECTF = DllStructCreate($tagGDIPRECTF)
  3203. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPathGradientRect", "handle", $hPathGradientBrush, "struct*", $tRECTF)
  3204. If @error Then Return SetError(@error, @extended, -1)
  3205. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3206. Local $aRectF[4]
  3207. For $iI = 1 To 4
  3208. $aRectF[$iI - 1] = DllStructGetData($tRECTF, $iI)
  3209. Next
  3210. Return $aRectF
  3211. EndFunc ;==>_GDIPlus_PathBrushGetRect
  3212. ; #FUNCTION# ====================================================================================================================
  3213. ; Author ........: Authenticity
  3214. ; Modified.......: Eukalyptus
  3215. ; ===============================================================================================================================
  3216. Func _GDIPlus_PathBrushGetWrapMode($hPathGradientBrush)
  3217. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPathGradientWrapMode", "handle", $hPathGradientBrush, "int*", 0)
  3218. If @error Then Return SetError(@error, @extended, -1)
  3219. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3220. Return $aResult[2]
  3221. EndFunc ;==>_GDIPlus_PathBrushGetWrapMode
  3222. ; #FUNCTION# ====================================================================================================================
  3223. ; Author ........: Authenticity
  3224. ; Modified.......: Eukalyptus
  3225. ; ===============================================================================================================================
  3226. Func _GDIPlus_PathBrushMultiplyTransform($hPathGradientBrush, $hMatrix, $iOrder = 0)
  3227. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipMultiplyPathGradientTransform", "handle", $hPathGradientBrush, "handle", $hMatrix, "int", $iOrder)
  3228. If @error Then Return SetError(@error, @extended, False)
  3229. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3230. Return True
  3231. EndFunc ;==>_GDIPlus_PathBrushMultiplyTransform
  3232. ; #FUNCTION# ====================================================================================================================
  3233. ; Author ........: Authenticity
  3234. ; Modified.......: Eukalyptus
  3235. ; ===============================================================================================================================
  3236. Func _GDIPlus_PathBrushResetTransform($hPathGradientBrush)
  3237. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipResetPathGradientTransform", "handle", $hPathGradientBrush)
  3238. If @error Then Return SetError(@error, @extended, False)
  3239. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3240. Return True
  3241. EndFunc ;==>_GDIPlus_PathBrushResetTransform
  3242. ; #FUNCTION# ====================================================================================================================
  3243. ; Author ........: Authenticity
  3244. ; Modified.......: Eukalyptus
  3245. ; ===============================================================================================================================
  3246. Func _GDIPlus_PathBrushSetBlend($hPathGradientBrush, $aBlends)
  3247. Local $iCount = $aBlends[0][0]
  3248. Local $tFactors = DllStructCreate("float[" & $iCount & "]")
  3249. Local $tPositions = DllStructCreate("float[" & $iCount & "]")
  3250. For $iI = 1 To $iCount
  3251. DllStructSetData($tFactors, 1, $aBlends[$iI][0], $iI)
  3252. DllStructSetData($tPositions, 1, $aBlends[$iI][1], $iI)
  3253. Next
  3254. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathGradientBlend", "handle", $hPathGradientBrush, "struct*", $tFactors, "struct*", $tPositions, "int", $iCount)
  3255. If @error Then Return SetError(@error, @extended, False)
  3256. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3257. Return True
  3258. EndFunc ;==>_GDIPlus_PathBrushSetBlend
  3259. ; #FUNCTION# ====================================================================================================================
  3260. ; Author ........: Authenticity
  3261. ; Modified.......: Eukalyptus
  3262. ; ===============================================================================================================================
  3263. Func _GDIPlus_PathBrushSetCenterColor($hPathGradientBrush, $iARGB)
  3264. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathGradientCenterColor", "handle", $hPathGradientBrush, "uint", $iARGB)
  3265. If @error Then Return SetError(@error, @extended, False)
  3266. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3267. Return True
  3268. EndFunc ;==>_GDIPlus_PathBrushSetCenterColor
  3269. ; #FUNCTION# ====================================================================================================================
  3270. ; Author ........: Authenticity
  3271. ; Modified.......: Eukalyptus
  3272. ; ===============================================================================================================================
  3273. Func _GDIPlus_PathBrushSetCenterPoint($hPathGradientBrush, $nX, $nY)
  3274. Local $tPointF = DllStructCreate("float;float")
  3275. DllStructSetData($tPointF, 1, $nX)
  3276. DllStructSetData($tPointF, 2, $nY)
  3277. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathGradientCenterPoint", "handle", $hPathGradientBrush, "struct*", $tPointF)
  3278. If @error Then Return SetError(@error, @extended, False)
  3279. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3280. Return True
  3281. EndFunc ;==>_GDIPlus_PathBrushSetCenterPoint
  3282. ; #FUNCTION# ====================================================================================================================
  3283. ; Author ........: Authenticity
  3284. ; Modified.......: Eukalyptus
  3285. ; ===============================================================================================================================
  3286. Func _GDIPlus_PathBrushSetFocusScales($hPathGradientBrush, $fScaleX, $fScaleY)
  3287. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathGradientFocusScales", "handle", $hPathGradientBrush, "float", $fScaleX, "float", $fScaleY)
  3288. If @error Then Return SetError(@error, @extended, False)
  3289. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3290. Return True
  3291. EndFunc ;==>_GDIPlus_PathBrushSetFocusScales
  3292. ; #FUNCTION# ====================================================================================================================
  3293. ; Author ........: Authenticity
  3294. ; Modified.......: Eukalyptus
  3295. ; ===============================================================================================================================
  3296. Func _GDIPlus_PathBrushSetGammaCorrection($hPathGradientBrush, $bUseGammaCorrection)
  3297. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathGradientGammaCorrection", "handle", $hPathGradientBrush, "int", $bUseGammaCorrection)
  3298. If @error Then Return SetError(@error, @extended, False)
  3299. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3300. Return True
  3301. EndFunc ;==>_GDIPlus_PathBrushSetGammaCorrection
  3302. ; #FUNCTION# ====================================================================================================================
  3303. ; Author ........: Authenticity
  3304. ; Modified.......: Eukalyptus
  3305. ; ===============================================================================================================================
  3306. Func _GDIPlus_PathBrushSetLinearBlend($hPathGradientBrush, $fFocus, $fScale = 1)
  3307. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathGradientLinearBlend", "handle", $hPathGradientBrush, "float", $fFocus, "float", $fScale)
  3308. If @error Then Return SetError(@error, @extended, False)
  3309. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3310. Return True
  3311. EndFunc ;==>_GDIPlus_PathBrushSetLinearBlend
  3312. ; #FUNCTION# ====================================================================================================================
  3313. ; Author ........: Authenticity
  3314. ; Modified.......: Eukalyptus
  3315. ; ===============================================================================================================================
  3316. Func _GDIPlus_PathBrushSetPresetBlend($hPathGradientBrush, $aInterpolations)
  3317. Local $iCount = $aInterpolations[0][0]
  3318. Local $tColors = DllStructCreate("uint[" & $iCount & "]")
  3319. Local $tPositions = DllStructCreate("float[" & $iCount & "]")
  3320. For $iI = 1 To $iCount
  3321. DllStructSetData($tColors, 1, $aInterpolations[$iI][0], $iI)
  3322. DllStructSetData($tPositions, 1, $aInterpolations[$iI][1], $iI)
  3323. Next
  3324. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathGradientPresetBlend", "handle", $hPathGradientBrush, "struct*", $tColors, "struct*", $tPositions, "int", $iCount)
  3325. If @error Then Return SetError(@error, @extended, False)
  3326. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3327. Return True
  3328. EndFunc ;==>_GDIPlus_PathBrushSetPresetBlend
  3329. ; #FUNCTION# ====================================================================================================================
  3330. ; Author ........: Authenticity
  3331. ; Modified.......: Eukalyptus
  3332. ; ===============================================================================================================================
  3333. Func _GDIPlus_PathBrushSetSigmaBlend($hPathGradientBrush, $fFocus, $fScale = 1)
  3334. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathGradientSigmaBlend", "handle", $hPathGradientBrush, "float", $fFocus, "float", $fScale)
  3335. If @error Then Return SetError(@error, @extended, False)
  3336. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3337. Return True
  3338. EndFunc ;==>_GDIPlus_PathBrushSetSigmaBlend
  3339. ; #FUNCTION# ====================================================================================================================
  3340. ; Author ........: Eukalyptus
  3341. ; Modified.......:
  3342. ; ===============================================================================================================================
  3343. Func _GDIPlus_PathBrushSetSurroundColor($hPathGradientBrush, $iARGB)
  3344. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathGradientSurroundColorsWithCount", "handle", $hPathGradientBrush, "uint*", $iARGB, "int*", 1)
  3345. If @error Then Return SetError(@error, @extended, False)
  3346. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3347. Return True
  3348. EndFunc ;==>_GDIPlus_PathBrushSetSurroundColor
  3349. ; #FUNCTION# ====================================================================================================================
  3350. ; Author ........: Authenticity
  3351. ; Modified.......: Eukalyptus
  3352. ; ===============================================================================================================================
  3353. Func _GDIPlus_PathBrushSetSurroundColorsWithCount($hPathGradientBrush, $aColors)
  3354. Local $iCount = $aColors[0]
  3355. Local $iColors = _GDIPlus_PathBrushGetPointCount($hPathGradientBrush)
  3356. If $iColors < $iCount Then $iCount = $iColors
  3357. Local $tColors = DllStructCreate("uint[" & $iCount & "]")
  3358. For $iI = 1 To $iCount
  3359. DllStructSetData($tColors, 1, $aColors[$iI], $iI)
  3360. Next
  3361. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathGradientSurroundColorsWithCount", "handle", $hPathGradientBrush, "struct*", $tColors, "int*", $iCount)
  3362. If @error Then Return SetError(@error, @extended, 0)
  3363. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  3364. Return $aResult[3]
  3365. EndFunc ;==>_GDIPlus_PathBrushSetSurroundColorsWithCount
  3366. ; #FUNCTION# ====================================================================================================================
  3367. ; Author ........: Authenticity
  3368. ; Modified.......: Eukalyptus
  3369. ; ===============================================================================================================================
  3370. Func _GDIPlus_PathBrushSetTransform($hPathGradientBrush, $hMatrix)
  3371. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathGradientTransform", "handle", $hPathGradientBrush, "handle", $hMatrix)
  3372. If @error Then Return SetError(@error, @extended, False)
  3373. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3374. Return True
  3375. EndFunc ;==>_GDIPlus_PathBrushSetTransform
  3376. ; #FUNCTION# ====================================================================================================================
  3377. ; Author ........: Authenticity
  3378. ; Modified.......: Eukalyptus
  3379. ; ===============================================================================================================================
  3380. Func _GDIPlus_PathBrushSetWrapMode($hPathGradientBrush, $iWrapMode)
  3381. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathGradientWrapMode", "handle", $hPathGradientBrush, "int", $iWrapMode)
  3382. If @error Then Return SetError(@error, @extended, False)
  3383. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3384. Return True
  3385. EndFunc ;==>_GDIPlus_PathBrushSetWrapMode
  3386. ; #FUNCTION# ====================================================================================================================
  3387. ; Author ........: Authenticity
  3388. ; Modified.......: Eukalyptus
  3389. ; ===============================================================================================================================
  3390. Func _GDIPlus_PathClone($hPath)
  3391. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipClonePath", "handle", $hPath, "handle*", 0)
  3392. If @error Then Return SetError(@error, @extended, 0)
  3393. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  3394. Return $aResult[2]
  3395. EndFunc ;==>_GDIPlus_PathClone
  3396. ; #FUNCTION# ====================================================================================================================
  3397. ; Author ........: Authenticity
  3398. ; Modified.......: Eukalyptus
  3399. ; ===============================================================================================================================
  3400. Func _GDIPlus_PathCloseFigure($hPath)
  3401. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipClosePathFigure", "handle", $hPath)
  3402. If @error Then Return SetError(@error, @extended, False)
  3403. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3404. Return True
  3405. EndFunc ;==>_GDIPlus_PathCloseFigure
  3406. ; #FUNCTION# ====================================================================================================================
  3407. ; Author ........: Authenticity
  3408. ; Modified.......: Eukalyptus
  3409. ; ===============================================================================================================================
  3410. Func _GDIPlus_PathCreate($iFillMode = 0)
  3411. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreatePath", "int", $iFillMode, "handle*", 0)
  3412. If @error Then Return SetError(@error, @extended, 0)
  3413. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  3414. Return $aResult[2]
  3415. EndFunc ;==>_GDIPlus_PathCreate
  3416. ; #FUNCTION# ====================================================================================================================
  3417. ; Author ........: Authenticity
  3418. ; Modified.......: Eukalyptus
  3419. ; ===============================================================================================================================
  3420. Func _GDIPlus_PathCreate2($aPathData, $iFillMode = 0)
  3421. Local $iCount = $aPathData[0][0]
  3422. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  3423. Local $tTypes = DllStructCreate("byte[" & $iCount & "]")
  3424. For $iI = 1 To $iCount
  3425. DllStructSetData($tPoints, 1, $aPathData[$iI][0], (($iI - 1) * 2) + 1)
  3426. DllStructSetData($tPoints, 1, $aPathData[$iI][1], (($iI - 1) * 2) + 2)
  3427. DllStructSetData($tTypes, 1, $aPathData[$iI][2], $iI)
  3428. Next
  3429. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreatePath2", "struct*", $tPoints, "struct*", $tTypes, "int", $iCount, "int", $iFillMode, "handle*", 0)
  3430. If @error Then Return SetError(@error, @extended, 0)
  3431. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  3432. Return $aResult[5]
  3433. EndFunc ;==>_GDIPlus_PathCreate2
  3434. ; #FUNCTION# ====================================================================================================================
  3435. ; Author ........: Authenticity
  3436. ; Modified.......: Eukalyptus
  3437. ; ===============================================================================================================================
  3438. Func _GDIPlus_PathDispose($hPath)
  3439. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeletePath", "handle", $hPath)
  3440. If @error Then Return SetError(@error, @extended, False)
  3441. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3442. Return True
  3443. EndFunc ;==>_GDIPlus_PathDispose
  3444. ; #FUNCTION# ====================================================================================================================
  3445. ; Author ........: Authenticity
  3446. ; Modified.......: Eukalyptus
  3447. ; ===============================================================================================================================
  3448. Func _GDIPlus_PathFlatten($hPath, $fFlatness = 0.25, $hMatrix = 0)
  3449. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipFlattenPath", "handle", $hPath, "handle", $hMatrix, "float", $fFlatness)
  3450. If @error Then Return SetError(@error, @extended, False)
  3451. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3452. Return True
  3453. EndFunc ;==>_GDIPlus_PathFlatten
  3454. ; #FUNCTION# ====================================================================================================================
  3455. ; Author ........: Authenticity
  3456. ; Modified.......: Eukalyptus
  3457. ; ===============================================================================================================================
  3458. Func _GDIPlus_PathGetData($hPath)
  3459. Local $iCount = _GDIPlus_PathGetPointCount($hPath)
  3460. Local $tPathData = DllStructCreate("int Count; ptr Points; ptr Types;")
  3461. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  3462. Local $tTypes = DllStructCreate("byte[" & $iCount & "]")
  3463. DllStructSetData($tPathData, "Count", $iCount)
  3464. DllStructSetData($tPathData, "Points", DllStructGetPtr($tPoints))
  3465. DllStructSetData($tPathData, "Types", DllStructGetPtr($tTypes))
  3466. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPathData", "handle", $hPath, "struct*", $tPathData)
  3467. If @error Then Return SetError(@error, @extended, 0)
  3468. If $aResult[0] Then Return SetError($aResult[0], $aResult[0], -1)
  3469. Local $aData[$iCount + 1][3]
  3470. $aData[0][0] = $iCount
  3471. For $iI = 1 To $iCount
  3472. $aData[$iI][0] = DllStructGetData($tPoints, 1, (($iI - 1) * 2) + 1)
  3473. $aData[$iI][1] = DllStructGetData($tPoints, 1, (($iI - 1) * 2) + 2)
  3474. $aData[$iI][2] = DllStructGetData($tTypes, 1, $iI)
  3475. Next
  3476. Return $aData
  3477. EndFunc ;==>_GDIPlus_PathGetData
  3478. ; #FUNCTION# ====================================================================================================================
  3479. ; Author ........: Authenticity
  3480. ; Modified.......: Eukalyptus
  3481. ; ===============================================================================================================================
  3482. Func _GDIPlus_PathGetFillMode($hPath)
  3483. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPathFillMode", "handle", $hPath, "int*", 0)
  3484. If @error Then Return SetError(@error, @extended, 0)
  3485. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  3486. Return $aResult[2]
  3487. EndFunc ;==>_GDIPlus_PathGetFillMode
  3488. ; #FUNCTION# ====================================================================================================================
  3489. ; Author ........: Authenticity
  3490. ; Modified.......: Eukalyptus
  3491. ; ===============================================================================================================================
  3492. Func _GDIPlus_PathGetLastPoint($hPath)
  3493. Local $tPointF = DllStructCreate("float;float")
  3494. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPathLastPoint", "handle", $hPath, "struct*", $tPointF)
  3495. If @error Then Return SetError(@error, @extended, -1)
  3496. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3497. Local $aPointF[2]
  3498. $aPointF[0] = DllStructGetData($tPointF, 1)
  3499. $aPointF[1] = DllStructGetData($tPointF, 2)
  3500. Return $aPointF
  3501. EndFunc ;==>_GDIPlus_PathGetLastPoint
  3502. ; #FUNCTION# ====================================================================================================================
  3503. ; Author ........: Authenticity
  3504. ; Modified.......: Eukalyptus
  3505. ; ===============================================================================================================================
  3506. Func _GDIPlus_PathGetPointCount($hPath)
  3507. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPointCount", "handle", $hPath, "int*", 0)
  3508. If @error Then Return SetError(@error, @extended, 0)
  3509. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  3510. Return $aResult[2]
  3511. EndFunc ;==>_GDIPlus_PathGetPointCount
  3512. ; #FUNCTION# ====================================================================================================================
  3513. ; Author ........: Authenticity
  3514. ; Modified.......: Eukalyptus
  3515. ; ===============================================================================================================================
  3516. Func _GDIPlus_PathGetPoints($hPath)
  3517. Local $iI, $iCount, $tPoints, $aPoints[1][1], $aResult
  3518. $iCount = _GDIPlus_PathGetPointCount($hPath)
  3519. If @error Then Return SetError(@error + 10, @extended, -1)
  3520. $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  3521. $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPathPoints", "handle", $hPath, "struct*", $tPoints, "int", $iCount)
  3522. If @error Then Return SetError(@error, @extended, -1)
  3523. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3524. Local $aPoints[$iCount + 1][2]
  3525. $aPoints[0][0] = $iCount
  3526. For $iI = 1 To $iCount
  3527. $aPoints[$iI][0] = DllStructGetData($tPoints, 1, (($iI - 1) * 2) + 1)
  3528. $aPoints[$iI][1] = DllStructGetData($tPoints, 1, (($iI - 1) * 2) + 2)
  3529. Next
  3530. Return $aPoints
  3531. EndFunc ;==>_GDIPlus_PathGetPoints
  3532. ; #FUNCTION# ====================================================================================================================
  3533. ; Author ........: Authenticity
  3534. ; Modified.......: Eukalyptus
  3535. ; ===============================================================================================================================
  3536. Func _GDIPlus_PathGetWorldBounds($hPath, $hMatrix = 0, $hPen = 0)
  3537. Local $tRECTF = DllStructCreate($tagGDIPRECTF)
  3538. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPathWorldBounds", "handle", $hPath, "struct*", $tRECTF, "handle", $hMatrix, "handle", $hPen)
  3539. If @error Then Return SetError(@error, @extended, -1)
  3540. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3541. Local $aRectF[4]
  3542. For $iI = 1 To 4
  3543. $aRectF[$iI - 1] = DllStructGetData($tRECTF, $iI)
  3544. Next
  3545. Return $aRectF
  3546. EndFunc ;==>_GDIPlus_PathGetWorldBounds
  3547. ; #FUNCTION# ====================================================================================================================
  3548. ; Author ........: Authenticity
  3549. ; Modified.......: Eukalyptus
  3550. ; ===============================================================================================================================
  3551. Func _GDIPlus_PathIsOutlineVisiblePoint($hPath, $nX, $nY, $hPen = 0, $hGraphics = 0)
  3552. __GDIPlus_PenDefCreate($hPen)
  3553. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipIsOutlineVisiblePathPoint", "handle", $hPath, "float", $nX, "float", $nY, "handle", $hPen, "handle", $hGraphics, "int*", 0)
  3554. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  3555. If @error Then Return SetError(@error, @extended, False)
  3556. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3557. Return $aResult[6] <> 0
  3558. EndFunc ;==>_GDIPlus_PathIsOutlineVisiblePoint
  3559. ; #FUNCTION# ====================================================================================================================
  3560. ; Author ........: Authenticity
  3561. ; Modified.......: Eukalyptus, jpm
  3562. ; ===============================================================================================================================
  3563. Func _GDIPlus_PathIsVisiblePoint($hPath, $nX, $nY, $hGraphics = 0)
  3564. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipIsVisiblePathPoint", "handle", $hPath, "float", $nX, "float", $nY, "handle", $hGraphics, "int*", 0)
  3565. If @error Then Return SetError(@error, @extended, False)
  3566. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3567. Return $aResult[5] <> 0
  3568. EndFunc ;==>_GDIPlus_PathIsVisiblePoint
  3569. ; #FUNCTION# ====================================================================================================================
  3570. ; Author ........: Authenticity
  3571. ; Modified.......: Eukalyptus
  3572. ; ===============================================================================================================================
  3573. Func _GDIPlus_PathIterCreate($hPath)
  3574. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreatePathIter", "handle*", 0, "handle", $hPath)
  3575. If @error Then Return SetError(@error, @extended, 0)
  3576. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  3577. Return $aResult[1]
  3578. EndFunc ;==>_GDIPlus_PathIterCreate
  3579. ; #FUNCTION# ====================================================================================================================
  3580. ; Author ........: Authenticity
  3581. ; Modified.......: Eukalyptus
  3582. ; ===============================================================================================================================
  3583. Func _GDIPlus_PathIterDispose($hPathIter)
  3584. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeletePathIter", "handle", $hPathIter)
  3585. If @error Then Return SetError(@error, @extended, False)
  3586. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3587. Return True
  3588. EndFunc ;==>_GDIPlus_PathIterDispose
  3589. ; #FUNCTION# ====================================================================================================================
  3590. ; Author ........: Authenticity
  3591. ; Modified.......: Eukalyptus
  3592. ; ===============================================================================================================================
  3593. Func _GDIPlus_PathIterGetSubpathCount($hPathIter)
  3594. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipPathIterGetSubpathCount", "handle", $hPathIter, "int*", 0)
  3595. If @error Then Return SetError(@error, @extended, -1)
  3596. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3597. Return $aResult[2]
  3598. EndFunc ;==>_GDIPlus_PathIterGetSubpathCount
  3599. ; #FUNCTION# ====================================================================================================================
  3600. ; Author ........: Authenticity
  3601. ; Modified.......: Eukalyptus
  3602. ; ===============================================================================================================================
  3603. Func _GDIPlus_PathIterNextMarkerPath($hPathIter, $hPath)
  3604. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipPathIterNextMarkerPath", "handle", $hPathIter, "int*", 0, "handle", $hPath)
  3605. If @error Then Return SetError(@error, @extended, -1)
  3606. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3607. Return $aResult[2]
  3608. EndFunc ;==>_GDIPlus_PathIterNextMarkerPath
  3609. ; #FUNCTION# ====================================================================================================================
  3610. ; Author ........: Authenticity
  3611. ; Modified.......: Eukalyptus
  3612. ; ===============================================================================================================================
  3613. Func _GDIPlus_PathIterNextSubpathPath($hPathIter, $hPath)
  3614. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipPathIterNextSubpathPath", "handle", $hPathIter, "int*", 0, "handle", $hPath, "bool*", 0)
  3615. If @error Then Return SetError(@error, @extended, -1)
  3616. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3617. Local $aReturn[2]
  3618. $aReturn[0] = $aResult[2]
  3619. $aReturn[1] = $aResult[4]
  3620. Return $aReturn
  3621. EndFunc ;==>_GDIPlus_PathIterNextSubpathPath
  3622. ; #FUNCTION# ====================================================================================================================
  3623. ; Author ........: Authenticity
  3624. ; Modified.......: Eukalyptus
  3625. ; ===============================================================================================================================
  3626. Func _GDIPlus_PathIterRewind($hPathIter)
  3627. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipPathIterRewind", "handle", $hPathIter)
  3628. If @error Then Return SetError(@error, @extended, False)
  3629. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3630. Return True
  3631. EndFunc ;==>_GDIPlus_PathIterRewind
  3632. ; #FUNCTION# ====================================================================================================================
  3633. ; Author ........: Authenticity
  3634. ; Modified.......: Eukalyptus
  3635. ; ===============================================================================================================================
  3636. Func _GDIPlus_PathReset($hPath)
  3637. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipResetPath", "handle", $hPath)
  3638. If @error Then Return SetError(@error, @extended, False)
  3639. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3640. Return True
  3641. EndFunc ;==>_GDIPlus_PathReset
  3642. ; #FUNCTION# ====================================================================================================================
  3643. ; Author ........: Authenticity
  3644. ; Modified.......: Eukalyptus
  3645. ; ===============================================================================================================================
  3646. Func _GDIPlus_PathReverse($hPath)
  3647. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipReversePath", "handle", $hPath)
  3648. If @error Then Return SetError(@error, @extended, False)
  3649. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3650. Return True
  3651. EndFunc ;==>_GDIPlus_PathReverse
  3652. ; #FUNCTION# ====================================================================================================================
  3653. ; Author ........: Authenticity
  3654. ; Modified.......: Eukalyptus
  3655. ; ===============================================================================================================================
  3656. Func _GDIPlus_PathSetFillMode($hPath, $iFillMode)
  3657. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathFillMode", "handle", $hPath, "int", $iFillMode)
  3658. If @error Then Return SetError(@error, @extended, False)
  3659. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3660. Return True
  3661. EndFunc ;==>_GDIPlus_PathSetFillMode
  3662. ; #FUNCTION# ====================================================================================================================
  3663. ; Author ........: Authenticity
  3664. ; Modified.......: Eukalyptus
  3665. ; Example .......: No
  3666. ; ===============================================================================================================================
  3667. Func _GDIPlus_PathSetMarker($hPath)
  3668. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPathMarker", "handle", $hPath)
  3669. If @error Then Return SetError(@error, @extended, False)
  3670. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3671. Return True
  3672. EndFunc ;==>_GDIPlus_PathSetMarker
  3673. ; #FUNCTION# ====================================================================================================================
  3674. ; Author ........: Authenticity
  3675. ; Modified.......: Eukalyptus
  3676. ; ===============================================================================================================================
  3677. Func _GDIPlus_PathStartFigure($hPath)
  3678. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipStartPathFigure", "handle", $hPath)
  3679. If @error Then Return SetError(@error, @extended, False)
  3680. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3681. Return True
  3682. EndFunc ;==>_GDIPlus_PathStartFigure
  3683. ; #FUNCTION# ====================================================================================================================
  3684. ; Author ........: Authenticity
  3685. ; Modified.......: Eukalyptus
  3686. ; ===============================================================================================================================
  3687. Func _GDIPlus_PathTransform($hPath, $hMatrix)
  3688. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipTransformPath", "handle", $hPath, "handle", $hMatrix)
  3689. If @error Then Return SetError(@error, @extended, False)
  3690. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3691. Return True
  3692. EndFunc ;==>_GDIPlus_PathTransform
  3693. ; #FUNCTION# ====================================================================================================================
  3694. ; Author ........: Authenticity
  3695. ; Modified.......: Eukalyptus
  3696. ; ===============================================================================================================================
  3697. Func _GDIPlus_PathWarp($hPath, $hMatrix, $aPoints, $nX, $nY, $nWidth, $nHeight, $iWarpMode = 0, $fFlatness = 0.25)
  3698. Local $iCount = $aPoints[0][0]
  3699. If $iCount <> 3 And $iCount <> 4 Then Return SetError(11, 0, False)
  3700. Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
  3701. For $iI = 1 To $iCount
  3702. DllStructSetData($tPoints, 1, $aPoints[$iI][0], ($iI - 1) * 2 + 1)
  3703. DllStructSetData($tPoints, 1, $aPoints[$iI][1], ($iI - 1) * 2 + 2)
  3704. Next
  3705. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipWarpPath", "handle", $hPath, "handle", $hMatrix, "struct*", $tPoints, "int", $iCount, _
  3706. "float", $nX, "float", $nY, "float", $nWidth, "float", $nHeight, "int", $iWarpMode, "float", $fFlatness)
  3707. If @error Then Return SetError(@error, @extended, False)
  3708. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3709. Return True
  3710. EndFunc ;==>_GDIPlus_PathWarp
  3711. ; #FUNCTION# ====================================================================================================================
  3712. ; Author ........: Authenticity
  3713. ; Modified.......: Eukalyptus
  3714. ; ===============================================================================================================================
  3715. Func _GDIPlus_PathWiden($hPath, $hPen, $hMatrix = 0, $fFlatness = 0.25)
  3716. __GDIPlus_PenDefCreate($hPen)
  3717. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipWidenPath", "handle", $hPath, "handle", $hPen, "handle", $hMatrix, "float", $fFlatness)
  3718. __GDIPlus_PenDefDispose() ; does destroyed @error, @extended
  3719. If @error Then Return SetError(@error, @extended, False)
  3720. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3721. Return True
  3722. EndFunc ;==>_GDIPlus_PathWiden
  3723. ; #FUNCTION# ====================================================================================================================
  3724. ; Author ........: Authenticity
  3725. ; Modified.......: Eukalyptus
  3726. ; ===============================================================================================================================
  3727. Func _GDIPlus_PathWindingModeOutline($hPath, $hMatrix = 0, $fFlatness = 0.25)
  3728. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipWindingModeOutline", "handle", $hPath, "handle", $hMatrix, "float", $fFlatness)
  3729. If @error Then Return SetError(@error, @extended, False)
  3730. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3731. Return True
  3732. EndFunc ;==>_GDIPlus_PathWindingModeOutline
  3733. ; #FUNCTION# ====================================================================================================================
  3734. ; Author ........: Paul Campbell (PaulIA)
  3735. ; Modified.......: Gary Frost
  3736. ; ===============================================================================================================================
  3737. Func _GDIPlus_PenCreate($iARGB = 0xFF000000, $nWidth = 1, $iUnit = 2)
  3738. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreatePen1", "dword", $iARGB, "float", $nWidth, "int", $iUnit, "handle*", 0)
  3739. If @error Then Return SetError(@error, @extended, 0)
  3740. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  3741. Return $aResult[4]
  3742. EndFunc ;==>_GDIPlus_PenCreate
  3743. ; #FUNCTION# ====================================================================================================================
  3744. ; Author ........: Authenticity
  3745. ; Modified.......: Eukalyptus
  3746. ; ===============================================================================================================================
  3747. Func _GDIPlus_PenCreate2($hBrush, $nWidth = 1, $iUnit = 2)
  3748. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreatePen2", "handle", $hBrush, "float", $nWidth, "int", $iUnit, "handle*", 0)
  3749. If @error Then Return SetError(@error, @extended, 0)
  3750. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  3751. Return $aResult[4]
  3752. EndFunc ;==>_GDIPlus_PenCreate2
  3753. ; #FUNCTION# ====================================================================================================================
  3754. ; Author ........: Paul Campbell (PaulIA)
  3755. ; Modified.......: Gary Frost
  3756. ; ===============================================================================================================================
  3757. Func _GDIPlus_PenDispose($hPen)
  3758. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeletePen", "handle", $hPen)
  3759. If @error Then Return SetError(@error, @extended, False)
  3760. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3761. Return True
  3762. EndFunc ;==>_GDIPlus_PenDispose
  3763. ; #FUNCTION# ====================================================================================================================
  3764. ; Author ........: Paul Campbell (PaulIA)
  3765. ; Modified.......: Gary Frost
  3766. ; ===============================================================================================================================
  3767. Func _GDIPlus_PenGetAlignment($hPen)
  3768. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPenMode", "handle", $hPen, "int*", 0)
  3769. If @error Then Return SetError(@error, @extended, -1)
  3770. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3771. Return $aResult[2]
  3772. EndFunc ;==>_GDIPlus_PenGetAlignment
  3773. ; #FUNCTION# ====================================================================================================================
  3774. ; Author ........: Paul Campbell (PaulIA)
  3775. ; Modified.......: Gary Frost
  3776. ; ===============================================================================================================================
  3777. Func _GDIPlus_PenGetColor($hPen)
  3778. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPenColor", "handle", $hPen, "dword*", 0)
  3779. If @error Then Return SetError(@error, @extended, -1)
  3780. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3781. Return $aResult[2]
  3782. EndFunc ;==>_GDIPlus_PenGetColor
  3783. ; #FUNCTION# ====================================================================================================================
  3784. ; Author ........: Paul Campbell (PaulIA)
  3785. ; Modified.......: Gary Frost
  3786. ; ===============================================================================================================================
  3787. Func _GDIPlus_PenGetCustomEndCap($hPen)
  3788. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPenCustomEndCap", "handle", $hPen, "handle*", 0)
  3789. If @error Then Return SetError(@error, @extended, 0)
  3790. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  3791. Return $aResult[2]
  3792. EndFunc ;==>_GDIPlus_PenGetCustomEndCap
  3793. ; #FUNCTION# ====================================================================================================================
  3794. ; Author ........: Paul Campbell (PaulIA)
  3795. ; Modified.......: Gary Frost
  3796. ; ===============================================================================================================================
  3797. Func _GDIPlus_PenGetDashCap($hPen)
  3798. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPenDashCap197819", "handle", $hPen, "int*", 0)
  3799. If @error Then Return SetError(@error, @extended, -1)
  3800. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3801. Return $aResult[2]
  3802. EndFunc ;==>_GDIPlus_PenGetDashCap
  3803. ; #FUNCTION# ====================================================================================================================
  3804. ; Author ........: Paul Campbell (PaulIA)
  3805. ; Modified.......: Gary Frost
  3806. ; ===============================================================================================================================
  3807. Func _GDIPlus_PenGetDashStyle($hPen)
  3808. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPenDashStyle", "handle", $hPen, "int*", 0)
  3809. If @error Then Return SetError(@error, @extended, -1)
  3810. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3811. Return $aResult[2]
  3812. EndFunc ;==>_GDIPlus_PenGetDashStyle
  3813. ; #FUNCTION# ====================================================================================================================
  3814. ; Author ........: Paul Campbell (PaulIA)
  3815. ; Modified.......: Gary Frost
  3816. ; ===============================================================================================================================
  3817. Func _GDIPlus_PenGetEndCap($hPen)
  3818. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPenEndCap", "handle", $hPen, "int*", 0)
  3819. If @error Then Return SetError(@error, @extended, -1)
  3820. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3821. Return $aResult[2]
  3822. EndFunc ;==>_GDIPlus_PenGetEndCap
  3823. ; #FUNCTION# ====================================================================================================================
  3824. ; Author ........: Authenticity
  3825. ; Modified.......: Eukalyptus
  3826. ; ===============================================================================================================================
  3827. Func _GDIPlus_PenGetMiterLimit($hPen)
  3828. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPenMiterLimit", "handle", $hPen, "float*", 0)
  3829. If @error Then Return SetError(@error, @extended, -1)
  3830. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3831. Return $aResult[2]
  3832. EndFunc ;==>_GDIPlus_PenGetMiterLimit
  3833. ; #FUNCTION# ====================================================================================================================
  3834. ; Author ........: Paul Campbell (PaulIA)
  3835. ; Modified.......: Gary Frost
  3836. ; ===============================================================================================================================
  3837. Func _GDIPlus_PenGetWidth($hPen)
  3838. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPenWidth", "handle", $hPen, "float*", 0)
  3839. If @error Then Return SetError(@error, @extended, -1)
  3840. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  3841. Return $aResult[2]
  3842. EndFunc ;==>_GDIPlus_PenGetWidth
  3843. ; #FUNCTION# ====================================================================================================================
  3844. ; Author ........: Authenticity
  3845. ; Modified ......: Eukalyptus
  3846. ; ===============================================================================================================================
  3847. Func _GDIPlus_PenResetTransform($hPen)
  3848. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipResetPenTransform", "handle", $hPen)
  3849. If @error Then Return SetError(@error, @extended, False)
  3850. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3851. Return True
  3852. EndFunc ;==>_GDIPlus_PenResetTransform
  3853. ; #FUNCTION# ====================================================================================================================
  3854. ; Author ........: Authenticity
  3855. ; Modified ......: Eukalyptus
  3856. ; ===============================================================================================================================
  3857. Func _GDIPlus_PenRotateTransform($hPen, $fAngle, $iOrder = 0)
  3858. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipRotatePenTransform", "handle", $hPen, "float", $fAngle, "int", $iOrder)
  3859. If @error Then Return SetError(@error, @extended, False)
  3860. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3861. Return True
  3862. EndFunc ;==>_GDIPlus_PenRotateTransform
  3863. ; #FUNCTION# ====================================================================================================================
  3864. ; Author ........: Authenticity
  3865. ; Modified ......: Eukalyptus
  3866. ; ===============================================================================================================================
  3867. Func _GDIPlus_PenScaleTransform($hPen, $fScaleX, $fScaleY, $iOrder = 0)
  3868. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipScalePenTransform", "handle", $hPen, "float", $fScaleX, "float", $fScaleY, "int", $iOrder)
  3869. If @error Then Return SetError(@error, @extended, False)
  3870. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3871. Return True
  3872. EndFunc ;==>_GDIPlus_PenScaleTransform
  3873. ; #FUNCTION# ====================================================================================================================
  3874. ; Author ........: Paul Campbell (PaulIA)
  3875. ; Modified.......: Gary Frost
  3876. ; ===============================================================================================================================
  3877. Func _GDIPlus_PenSetAlignment($hPen, $iAlignment = 0)
  3878. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPenMode", "handle", $hPen, "int", $iAlignment)
  3879. If @error Then Return SetError(@error, @extended, False)
  3880. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3881. Return True
  3882. EndFunc ;==>_GDIPlus_PenSetAlignment
  3883. ; #FUNCTION# ====================================================================================================================
  3884. ; Author ........: Paul Campbell (PaulIA)
  3885. ; Modified.......: Gary Frost
  3886. ; ===============================================================================================================================
  3887. Func _GDIPlus_PenSetColor($hPen, $iARGB)
  3888. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPenColor", "handle", $hPen, "dword", $iARGB)
  3889. If @error Then Return SetError(@error, @extended, False)
  3890. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3891. Return True
  3892. EndFunc ;==>_GDIPlus_PenSetColor
  3893. ; #FUNCTION# ====================================================================================================================
  3894. ; Author ........: Authenticity
  3895. ; Modified ......: Eukalyptus
  3896. ; ===============================================================================================================================
  3897. Func _GDIPlus_PenSetCompound($hPen, $aCompounds)
  3898. Local $iCount = $aCompounds[0]
  3899. Local $tCompounds = DllStructCreate("float[" & $iCount & "];")
  3900. For $i = 1 To $iCount
  3901. DllStructSetData($tCompounds, 1, $aCompounds[$i], $i)
  3902. Next
  3903. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPenCompoundArray", "handle", $hPen, "struct*", $tCompounds, "int", $iCount)
  3904. If @error Then Return SetError(@error, @extended, False)
  3905. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3906. Return True
  3907. EndFunc ;==>_GDIPlus_PenSetCompound
  3908. ; #FUNCTION# ====================================================================================================================
  3909. ; Author ........: Paul Campbell (PaulIA)
  3910. ; Modified.......: Gary Frost
  3911. ; ===============================================================================================================================
  3912. Func _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap)
  3913. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPenCustomEndCap", "handle", $hPen, "handle", $hEndCap)
  3914. If @error Then Return SetError(@error, @extended, False)
  3915. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3916. Return True
  3917. EndFunc ;==>_GDIPlus_PenSetCustomEndCap
  3918. ; #FUNCTION# ====================================================================================================================
  3919. ; Author ........: Paul Campbell (PaulIA)
  3920. ; Modified.......: Gary Frost
  3921. ; ===============================================================================================================================
  3922. Func _GDIPlus_PenSetDashCap($hPen, $iDash = 0)
  3923. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPenDashCap197819", "handle", $hPen, "int", $iDash)
  3924. If @error Then Return SetError(@error, @extended, False)
  3925. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3926. Return True
  3927. EndFunc ;==>_GDIPlus_PenSetDashCap
  3928. ; #FUNCTION# ====================================================================================================================
  3929. ; Author ........: Paul Campbell (PaulIA)
  3930. ; Modified.......: Gary Frost
  3931. ; ===============================================================================================================================
  3932. Func _GDIPlus_PenSetDashStyle($hPen, $iStyle = 0)
  3933. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPenDashStyle", "handle", $hPen, "int", $iStyle)
  3934. If @error Then Return SetError(@error, @extended, False)
  3935. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3936. Return True
  3937. EndFunc ;==>_GDIPlus_PenSetDashStyle
  3938. ; #FUNCTION# ====================================================================================================================
  3939. ; Author ........: Paul Campbell (PaulIA)
  3940. ; Modified.......: Gary Frost
  3941. ; ===============================================================================================================================
  3942. Func _GDIPlus_PenSetEndCap($hPen, $iEndCap)
  3943. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPenEndCap", "handle", $hPen, "int", $iEndCap)
  3944. If @error Then Return SetError(@error, @extended, False)
  3945. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3946. Return True
  3947. EndFunc ;==>_GDIPlus_PenSetEndCap
  3948. ; #FUNCTION# ====================================================================================================================
  3949. ; Author ........: Authenticity
  3950. ; Modified.......: Eukalyptus
  3951. ; Example .......; No
  3952. ; ===============================================================================================================================
  3953. Func _GDIPlus_PenSetLineCap($hPen, $iStartCap, $iEndCap, $iDashCap)
  3954. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPenLineCap197819", "handle", $hPen, "int", $iStartCap, "int", $iEndCap, "int", $iDashCap)
  3955. If @error Then Return SetError(@error, @extended, False)
  3956. If $aResult[0] Then SetError(10, $aResult[0], False)
  3957. Return True
  3958. EndFunc ;==>_GDIPlus_PenSetLineCap
  3959. ; #FUNCTION# ====================================================================================================================
  3960. ; Author ........: Authenticity
  3961. ; Modified.......: Eukalyptus
  3962. ; ===============================================================================================================================
  3963. Func _GDIPlus_PenSetLineJoin($hPen, $iLineJoin)
  3964. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPenLineJoin", "handle", $hPen, "int", $iLineJoin)
  3965. If @error Then Return SetError(@error, @extended, False)
  3966. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3967. Return True
  3968. EndFunc ;==>_GDIPlus_PenSetLineJoin
  3969. ; #FUNCTION# ====================================================================================================================
  3970. ; Author ........: Authenticity
  3971. ; Modified.......: Eukalyptus
  3972. ; ===============================================================================================================================
  3973. Func _GDIPlus_PenSetMiterLimit($hPen, $fMiterLimit)
  3974. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPenMiterLimit", "handle", $hPen, "float", $fMiterLimit)
  3975. If @error Then Return SetError(@error, @extended, False)
  3976. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3977. Return True
  3978. EndFunc ;==>_GDIPlus_PenSetMiterLimit
  3979. ; #FUNCTION# ====================================================================================================================
  3980. ; Author ........: Authenticity
  3981. ; Modified.......: Eukalyptus
  3982. ; ===============================================================================================================================
  3983. Func _GDIPlus_PenSetStartCap($hPen, $iLineCap)
  3984. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPenStartCap", "handle", $hPen, "int", $iLineCap)
  3985. If @error Then Return SetError(@error, @extended, False)
  3986. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3987. Return True
  3988. EndFunc ;==>_GDIPlus_PenSetStartCap
  3989. ; #FUNCTION# ====================================================================================================================
  3990. ; Author ........: Authenticity
  3991. ; Modified ......: Eukalyptus
  3992. ; ===============================================================================================================================
  3993. Func _GDIPlus_PenSetTransform($hPen, $hMatrix)
  3994. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPenTransform", "handle", $hPen, "handle", $hMatrix)
  3995. If @error Then Return SetError(@error, @extended, False)
  3996. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  3997. Return True
  3998. EndFunc ;==>_GDIPlus_PenSetTransform
  3999. ; #FUNCTION# ====================================================================================================================
  4000. ; Author ........: Paul Campbell (PaulIA)
  4001. ; Modified.......: Gary Frost
  4002. ; ===============================================================================================================================
  4003. Func _GDIPlus_PenSetWidth($hPen, $fWidth)
  4004. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetPenWidth", "handle", $hPen, "float", $fWidth)
  4005. If @error Then Return SetError(@error, @extended, False)
  4006. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4007. Return True
  4008. EndFunc ;==>_GDIPlus_PenSetWidth
  4009. ; #FUNCTION# ====================================================================================================================
  4010. ; Author ........: Paul Campbell (PaulIA)
  4011. ; Modified.......:
  4012. ; ===============================================================================================================================
  4013. Func _GDIPlus_RectFCreate($nX = 0, $nY = 0, $nWidth = 0, $nHeight = 0)
  4014. Local $tRECTF = DllStructCreate($tagGDIPRECTF)
  4015. DllStructSetData($tRECTF, "X", $nX)
  4016. DllStructSetData($tRECTF, "Y", $nY)
  4017. DllStructSetData($tRECTF, "Width", $nWidth)
  4018. DllStructSetData($tRECTF, "Height", $nHeight)
  4019. Return $tRECTF
  4020. EndFunc ;==>_GDIPlus_RectFCreate
  4021. ; #FUNCTION# ====================================================================================================================
  4022. ; Author ........: Authenticity
  4023. ; Modified.......: Eukalyptus
  4024. ; ===============================================================================================================================
  4025. Func _GDIPlus_RegionClone($hRegion)
  4026. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCloneRegion", "handle", $hRegion, "handle*", 0)
  4027. If @error Then Return SetError(@error, @extended, 0)
  4028. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  4029. Return $aResult[2]
  4030. EndFunc ;==>_GDIPlus_RegionClone
  4031. ; #FUNCTION# ====================================================================================================================
  4032. ; Author ........: Authenticity
  4033. ; Modified.......: Eukalyptus
  4034. ; ===============================================================================================================================
  4035. Func _GDIPlus_RegionCombinePath($hRegion, $hPath, $iCombineMode = 2)
  4036. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCombineRegionPath", "handle", $hRegion, "handle", $hPath, "int", $iCombineMode)
  4037. If @error Then Return SetError(@error, @extended, False)
  4038. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4039. Return True
  4040. EndFunc ;==>_GDIPlus_RegionCombinePath
  4041. ; #FUNCTION# ====================================================================================================================
  4042. ; Author ........: Authenticity
  4043. ; Modified.......: Eukalyptus
  4044. ; ===============================================================================================================================
  4045. Func _GDIPlus_RegionCombineRect($hRegion, $nX, $nY, $nWidth, $nHeight, $iCombineMode = 2)
  4046. Local $tRECTF = _GDIPlus_RectFCreate($nX, $nY, $nWidth, $nHeight)
  4047. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCombineRegionRect", "handle", $hRegion, "struct*", $tRECTF, "int", $iCombineMode)
  4048. If @error Then Return SetError(@error, @extended, False)
  4049. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4050. Return True
  4051. EndFunc ;==>_GDIPlus_RegionCombineRect
  4052. ; #FUNCTION# ====================================================================================================================
  4053. ; Author ........: Authenticity
  4054. ; Modified.......: Eukalyptus
  4055. ; ===============================================================================================================================
  4056. Func _GDIPlus_RegionCombineRegion($hRegionDst, $hRegionSrc, $iCombineMode = 2)
  4057. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCombineRegionRegion", "handle", $hRegionDst, "handle", $hRegionSrc, "int", $iCombineMode)
  4058. If @error Then Return SetError(@error, @extended, False)
  4059. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4060. Return True
  4061. EndFunc ;==>_GDIPlus_RegionCombineRegion
  4062. ; #FUNCTION# ====================================================================================================================
  4063. ; Author ........: Authenticity
  4064. ; Modified.......: Eukalyptus
  4065. ; ===============================================================================================================================
  4066. Func _GDIPlus_RegionCreate()
  4067. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateRegion", "handle*", 0)
  4068. If @error Then Return SetError(@error, @extended, 0)
  4069. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  4070. Return $aResult[1]
  4071. EndFunc ;==>_GDIPlus_RegionCreate
  4072. ; #FUNCTION# ====================================================================================================================
  4073. ; Author ........: Authenticity
  4074. ; Modified.......: Eukalyptus
  4075. ; ===============================================================================================================================
  4076. Func _GDIPlus_RegionCreateFromPath($hPath)
  4077. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateRegionPath", "handle", $hPath, "handle*", 0)
  4078. If @error Then Return SetError(@error, @extended, 0)
  4079. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  4080. Return $aResult[2]
  4081. EndFunc ;==>_GDIPlus_RegionCreateFromPath
  4082. ; #FUNCTION# ====================================================================================================================
  4083. ; Author ........: Authenticity
  4084. ; Modified.......: Eukalyptus
  4085. ; ===============================================================================================================================
  4086. Func _GDIPlus_RegionCreateFromRect($nX, $nY, $nWidth, $nHeight)
  4087. Local $tRECTF = _GDIPlus_RectFCreate($nX, $nY, $nWidth, $nHeight)
  4088. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateRegionRect", "struct*", $tRECTF, "handle*", 0)
  4089. If @error Then Return SetError(@error, @extended, 0)
  4090. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  4091. Return $aResult[2]
  4092. EndFunc ;==>_GDIPlus_RegionCreateFromRect
  4093. ; #FUNCTION# ====================================================================================================================
  4094. ; Author ........: Authenticity
  4095. ; Modified.......: Eukalyptus
  4096. ; ===============================================================================================================================
  4097. Func _GDIPlus_RegionDispose($hRegion)
  4098. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeleteRegion", "handle", $hRegion)
  4099. If @error Then Return SetError(@error, @extended, False)
  4100. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4101. Return True
  4102. EndFunc ;==>_GDIPlus_RegionDispose
  4103. ; #FUNCTION# ====================================================================================================================
  4104. ; Author ........: Authenticity
  4105. ; Modified.......: Eukalyptus
  4106. ; ===============================================================================================================================
  4107. Func _GDIPlus_RegionGetBounds($hRegion, $hGraphics)
  4108. Local $tRECTF = DllStructCreate($tagGDIPRECTF)
  4109. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetRegionBounds", "handle", $hRegion, "handle", $hGraphics, "struct*", $tRECTF)
  4110. If @error Then Return SetError(@error, @extended, -1)
  4111. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  4112. Local $aBounds[4]
  4113. For $iI = 1 To 4
  4114. $aBounds[$iI - 1] = DllStructGetData($tRECTF, $iI)
  4115. Next
  4116. Return $aBounds
  4117. EndFunc ;==>_GDIPlus_RegionGetBounds
  4118. ; #FUNCTION# ====================================================================================================================
  4119. ; Author ........: Authenticity
  4120. ; Modified.......: Eukalyptus
  4121. ; ===============================================================================================================================
  4122. Func _GDIPlus_RegionGetHRgn($hRegion, $hGraphics = 0)
  4123. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetRegionHRgn", "handle", $hRegion, "handle", $hGraphics, "handle*", 0)
  4124. If @error Then Return SetError(@error, @extended, False)
  4125. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4126. Return $aResult[3]
  4127. EndFunc ;==>_GDIPlus_RegionGetHRgn
  4128. ; #FUNCTION# ====================================================================================================================
  4129. ; Author ........: Authenticity
  4130. ; Modified ......: Eukalyptus
  4131. ; ===============================================================================================================================
  4132. Func _GDIPlus_RegionSetEmpty($hRegion)
  4133. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetEmpty", "handle", $hRegion)
  4134. If @error Then Return SetError(@error, @extended, False)
  4135. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4136. Return True
  4137. EndFunc ;==>_GDIPlus_RegionSetEmpty
  4138. ; #FUNCTION# ====================================================================================================================
  4139. ; Author ........: Authenticity
  4140. ; Modified ......: Eukalyptus
  4141. ; ===============================================================================================================================
  4142. Func _GDIPlus_RegionSetInfinite($hRegion)
  4143. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetInfinite", "handle", $hRegion)
  4144. If @error Then Return SetError(@error, @extended, False)
  4145. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4146. Return True
  4147. EndFunc ;==>_GDIPlus_RegionSetInfinite
  4148. ; #FUNCTION# ====================================================================================================================
  4149. ; Author ........: Authenticity
  4150. ; Modified.......: Eukalyptus
  4151. ; ===============================================================================================================================
  4152. Func _GDIPlus_RegionTransform($hRegion, $hMatrix)
  4153. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipTransformRegion", "handle", $hRegion, "handle", $hMatrix)
  4154. If @error Then Return SetError(@error, @extended, False)
  4155. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4156. Return True
  4157. EndFunc ;==>_GDIPlus_RegionTransform
  4158. ; #FUNCTION# ====================================================================================================================
  4159. ; Author ........: Authenticity
  4160. ; Modified.......: Eukalyptus
  4161. ; ===============================================================================================================================
  4162. Func _GDIPlus_RegionTranslate($hRegion, $nDX, $nDY)
  4163. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipTranslateRegion", "handle", $hRegion, "float", $nDX, "float", $nDY)
  4164. If @error Then Return SetError(@error, @extended, False)
  4165. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4166. Return True
  4167. EndFunc ;==>_GDIPlus_RegionTranslate
  4168. ; #FUNCTION# ====================================================================================================================
  4169. ; Author ........: Paul Campbell (PaulIA)
  4170. ; Modified.......:
  4171. ; ===============================================================================================================================
  4172. Func _GDIPlus_Shutdown()
  4173. If $__g_hGDIPDll = 0 Then Return SetError(-1, -1, False)
  4174. $__g_iGDIPRef -= 1
  4175. If $__g_iGDIPRef = 0 Then
  4176. DllCall($__g_hGDIPDll, "none", "GdiplusShutdown", "ulong_ptr", $__g_iGDIPToken)
  4177. DllClose($__g_hGDIPDll)
  4178. $__g_hGDIPDll = 0
  4179. EndIf
  4180. Return True
  4181. EndFunc ;==>_GDIPlus_Shutdown
  4182. ; #FUNCTION# ====================================================================================================================
  4183. ; Author ........: Paul Campbell (PaulIA)
  4184. ; Modified.......: Gary Frost, jpm, UEZ
  4185. ; ===============================================================================================================================
  4186. Func _GDIPlus_Startup($sGDIPDLL = Default, $bRetDllHandle = False)
  4187. $__g_iGDIPRef += 1
  4188. If $__g_iGDIPRef > 1 Then Return True
  4189. If $sGDIPDLL = Default Then $sGDIPDLL = "gdiplus.dll"
  4190. $__g_hGDIPDll = DllOpen($sGDIPDLL)
  4191. If $__g_hGDIPDll = -1 Then
  4192. $__g_iGDIPRef = 0
  4193. Return SetError(1, 2, False)
  4194. EndIf
  4195. Local $sVer = FileGetVersion($sGDIPDLL)
  4196. $sVer = StringSplit($sVer, ".")
  4197. If $sVer[1] > 5 Then $__g_bGDIP_V1_0 = False
  4198. Local $tInput = DllStructCreate($tagGDIPSTARTUPINPUT)
  4199. Local $tToken = DllStructCreate("ulong_ptr Data")
  4200. DllStructSetData($tInput, "Version", 1)
  4201. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdiplusStartup", "struct*", $tToken, "struct*", $tInput, "ptr", 0)
  4202. If @error Then Return SetError(@error, @extended, False)
  4203. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4204. $__g_iGDIPToken = DllStructGetData($tToken, "Data")
  4205. If $bRetDllHandle Then Return $__g_hGDIPDll
  4206. Return SetExtended($sVer[1], True)
  4207. EndFunc ;==>_GDIPlus_Startup
  4208. ; #FUNCTION# ====================================================================================================================
  4209. ; Author ........: Paul Campbell (PaulIA)
  4210. ; Modified.......: Gary Frost
  4211. ; ===============================================================================================================================
  4212. Func _GDIPlus_StringFormatCreate($iFormat = 0, $iLangID = 0)
  4213. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateStringFormat", "int", $iFormat, "word", $iLangID, "handle*", 0)
  4214. If @error Then Return SetError(@error, @extended, 0)
  4215. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  4216. Return $aResult[3]
  4217. EndFunc ;==>_GDIPlus_StringFormatCreate
  4218. ; #FUNCTION# ====================================================================================================================
  4219. ; Author ........: Paul Campbell (PaulIA)
  4220. ; Modified.......: Gary Frost
  4221. ; ===============================================================================================================================
  4222. Func _GDIPlus_StringFormatDispose($hFormat)
  4223. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeleteStringFormat", "handle", $hFormat)
  4224. If @error Then Return SetError(@error, @extended, False)
  4225. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4226. Return True
  4227. EndFunc ;==>_GDIPlus_StringFormatDispose
  4228. ; #FUNCTION# ====================================================================================================================
  4229. ; Author ........: Authenticity
  4230. ; Modified.......: Eukalyptus
  4231. ; ===============================================================================================================================
  4232. Func _GDIPlus_StringFormatGetMeasurableCharacterRangeCount($hStringFormat)
  4233. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetStringFormatMeasurableCharacterRangeCount", "handle", $hStringFormat, "int*", 0)
  4234. If @error Then Return SetError(@error, @extended, -1)
  4235. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  4236. Return $aResult[2]
  4237. EndFunc ;==>_GDIPlus_StringFormatGetMeasurableCharacterRangeCount
  4238. ; #FUNCTION# ====================================================================================================================
  4239. ; Author ........: Andreas Karlsson (monoceres)
  4240. ; Modified.......:
  4241. ; ===============================================================================================================================
  4242. Func _GDIPlus_StringFormatSetAlign($hStringFormat, $iFlag)
  4243. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetStringFormatAlign", "handle", $hStringFormat, "int", $iFlag)
  4244. If @error Then Return SetError(@error, @extended, False)
  4245. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4246. Return True
  4247. EndFunc ;==>_GDIPlus_StringFormatSetAlign
  4248. ; #FUNCTION# ====================================================================================================================
  4249. ; Author ........: Authenticity
  4250. ; Modified.......: Eukalyptus
  4251. ; ===============================================================================================================================
  4252. Func _GDIPlus_StringFormatSetLineAlign($hStringFormat, $iStringAlign)
  4253. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetStringFormatLineAlign", "handle", $hStringFormat, "int", $iStringAlign)
  4254. If @error Then Return SetError(@error, @extended, False)
  4255. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4256. Return True
  4257. EndFunc ;==>_GDIPlus_StringFormatSetLineAlign
  4258. ; #FUNCTION# ====================================================================================================================
  4259. ; Author ........: Authenticity
  4260. ; Modified.......: Eukalyptus
  4261. ; ===============================================================================================================================
  4262. Func _GDIPlus_StringFormatSetMeasurableCharacterRanges($hStringFormat, $aRanges)
  4263. Local $iCount = $aRanges[0][0]
  4264. Local $tCharacterRanges = DllStructCreate("int[" & $iCount * 2 & "]")
  4265. For $iI = 1 To $iCount
  4266. DllStructSetData($tCharacterRanges, 1, $aRanges[$iI][0], (($iI - 1) * 2) + 1)
  4267. DllStructSetData($tCharacterRanges, 1, $aRanges[$iI][1], (($iI - 1) * 2) + 2)
  4268. Next
  4269. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetStringFormatMeasurableCharacterRanges", "handle", $hStringFormat, "int", $iCount, "struct*", $tCharacterRanges)
  4270. If @error Then Return SetError(@error, @extended, False)
  4271. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4272. Return True
  4273. EndFunc ;==>_GDIPlus_StringFormatSetMeasurableCharacterRanges
  4274. ; #FUNCTION# ====================================================================================================================
  4275. ; Author ........: Authenticity
  4276. ; Modified.......: UEZ
  4277. ; ===============================================================================================================================
  4278. Func _GDIPlus_TextureCreate($hImage, $iWrapMode = 0)
  4279. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateTexture", "handle", $hImage, "int", $iWrapMode, "handle*", 0)
  4280. If @error Then Return SetError(@error, @extended, 0)
  4281. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  4282. Return $aResult[3]
  4283. EndFunc ;==>_GDIPlus_TextureCreate
  4284. ; #FUNCTION# ====================================================================================================================
  4285. ; Author ........: Authenticity
  4286. ; Modified.......: UEZ
  4287. ; ===============================================================================================================================
  4288. Func _GDIPlus_TextureCreate2($hImage, $nX, $nY, $nWidth, $nHeight, $iWrapMode = 0)
  4289. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateTexture2", "handle", $hImage, "int", $iWrapMode, "float", $nX, "float", $nY, "float", $nWidth, "float", $nHeight, "handle*", 0)
  4290. If @error Then Return SetError(@error, @extended, 0)
  4291. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  4292. Return $aResult[7]
  4293. EndFunc ;==>_GDIPlus_TextureCreate2
  4294. ; #FUNCTION# ====================================================================================================================
  4295. ; Author ........: Authenticity
  4296. ; Modified.......: Eukalyptus
  4297. ; ===============================================================================================================================
  4298. Func _GDIPlus_TextureCreateIA($hImage, $nX, $nY, $nWidth, $nHeight, $pImageAttributes = 0)
  4299. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateTextureIA", "handle", $hImage, "handle", $pImageAttributes, "float", $nX, "float", $nY, "float", $nWidth, "float", $nHeight, "ptr*", 0)
  4300. If @error Then Return SetError(@error, @extended, 0)
  4301. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  4302. Return $aResult[7]
  4303. EndFunc ;==>_GDIPlus_TextureCreateIA
  4304. ; #INTERNAL_USE_ONLY# ===========================================================================================================
  4305. ; Name...........: __GDIPlus_BrushDefCreate
  4306. ; Description ...: Create a default Brush object if needed
  4307. ; Syntax.........: __GDIPlus_BrushDefCreate ( ByRef $hBrush )
  4308. ; Parameters ....: $hBrush - Handle to a Brush object
  4309. ; Return values .: Success - $hBrush or a default Brush object
  4310. ; Author ........: Paul Campbell (PaulIA)
  4311. ; Modified.......:
  4312. ; Remarks .......:
  4313. ; Related .......:
  4314. ; Link ..........:
  4315. ; ===============================================================================================================================
  4316. Func __GDIPlus_BrushDefCreate(ByRef $hBrush)
  4317. If $hBrush = 0 Then
  4318. $__g_hGDIPBrush = _GDIPlus_BrushCreateSolid()
  4319. $hBrush = $__g_hGDIPBrush
  4320. EndIf
  4321. EndFunc ;==>__GDIPlus_BrushDefCreate
  4322. ; #INTERNAL_USE_ONLY# ===========================================================================================================
  4323. ; Name...........: __GDIPlus_BrushDefDispose
  4324. ; Description ...: Free default Brush object
  4325. ; Syntax.........: __GDIPlus_BrushDefDispose ( )
  4326. ; Parameters ....:
  4327. ; Return values .:
  4328. ; Author ........: Paul Campbell (PaulIA)
  4329. ; Modified.......:
  4330. ; Remarks .......:
  4331. ; Related .......:
  4332. ; Link ..........:
  4333. ; ===============================================================================================================================
  4334. Func __GDIPlus_BrushDefDispose($iCurError = @error, $iCurExtended = @extended)
  4335. If $__g_hGDIPBrush <> 0 Then
  4336. _GDIPlus_BrushDispose($__g_hGDIPBrush)
  4337. $__g_hGDIPBrush = 0
  4338. EndIf
  4339. Return SetError($iCurError, $iCurExtended) ; restore caller @error and @extended
  4340. EndFunc ;==>__GDIPlus_BrushDefDispose
  4341. ; #INTERNAL_USE_ONLY# ===========================================================================================================
  4342. ; Name...........: __GDIPlus_ExtractFileExt
  4343. ; Description ...: Extracts the extension part of the given filename
  4344. ; Syntax.........: __GDIPlus_ExtractFileExt ( $sFileName [, $bNoDot = True] )
  4345. ; Parameters ....: $sFileName - Filename
  4346. ; $bNoDot - Determines whether the filename/extension separator is returned
  4347. ; |True - The separator is returned with the extension
  4348. ; |False - The separator is not returned with the extension
  4349. ; Return values .: Success - Extension part
  4350. ; Failure - Empty string
  4351. ; Author ........: Paul Campbell (PaulIA)
  4352. ; Modified.......:
  4353. ; Remarks .......:
  4354. ; Related .......:
  4355. ; Link ..........:
  4356. ; ===============================================================================================================================
  4357. Func __GDIPlus_ExtractFileExt($sFileName, $bNoDot = True)
  4358. Local $iIndex = __GDIPlus_LastDelimiter(".\:", $sFileName)
  4359. If ($iIndex > 0) And (StringMid($sFileName, $iIndex, 1) = '.') Then
  4360. If $bNoDot Then
  4361. Return StringMid($sFileName, $iIndex + 1)
  4362. Else
  4363. Return StringMid($sFileName, $iIndex)
  4364. EndIf
  4365. Else
  4366. Return ""
  4367. EndIf
  4368. EndFunc ;==>__GDIPlus_ExtractFileExt
  4369. ; #INTERNAL_USE_ONLY# ===========================================================================================================
  4370. ; Name...........: __GDIPlus_LastDelimiter
  4371. ; Description ...: Returns the index of the right most whole character that matches any character in a delimiter string
  4372. ; Syntax.........: __GDIPlus_LastDelimiter ( $sDelimiters, $sString )
  4373. ; Parameters ....: $sDelimiters - Delimiters
  4374. ; $String - String to be searched
  4375. ; Return values .: Success - Right most whole character that matches one of the delimiters
  4376. ; Author ........: Paul Campbell (PaulIA)
  4377. ; Modified.......:
  4378. ; Remarks .......:
  4379. ; Related .......:
  4380. ; Link ..........:
  4381. ; ===============================================================================================================================
  4382. Func __GDIPlus_LastDelimiter($sDelimiters, $sString)
  4383. Local $sDelimiter, $iN
  4384. For $iI = 1 To StringLen($sDelimiters)
  4385. $sDelimiter = StringMid($sDelimiters, $iI, 1)
  4386. $iN = StringInStr($sString, $sDelimiter, $STR_NOCASESENSEBASIC, -1)
  4387. If $iN > 0 Then Return $iN
  4388. Next
  4389. EndFunc ;==>__GDIPlus_LastDelimiter
  4390. ; #INTERNAL_USE_ONLY# ===========================================================================================================
  4391. ; Name...........: __GDIPlus_PenDefCreate
  4392. ; Description ...: Create a default Pen object if needed
  4393. ; Syntax.........: __GDIPlus_PenDefCreate ( ByRef $hPen )
  4394. ; Parameters ....: $hPen - Handle to a pen object
  4395. ; Return values .: Success - $hPen or a default pen object
  4396. ; Author ........: Paul Campbell (PaulIA)
  4397. ; Modified.......:
  4398. ; Remarks .......:
  4399. ; Related .......:
  4400. ; Link ..........:
  4401. ; ===============================================================================================================================
  4402. Func __GDIPlus_PenDefCreate(ByRef $hPen)
  4403. If $hPen = 0 Then
  4404. $__g_hGDIPPen = _GDIPlus_PenCreate()
  4405. $hPen = $__g_hGDIPPen
  4406. EndIf
  4407. EndFunc ;==>__GDIPlus_PenDefCreate
  4408. ; #INTERNAL_USE_ONLY# ===========================================================================================================
  4409. ; Name...........: __GDIPlus_PenDefDispose
  4410. ; Description ...: Free default Pen object
  4411. ; Syntax.........: __GDIPlus_PenDefDispose ( )
  4412. ; Parameters ....:
  4413. ; Return values .:
  4414. ; Author ........: Paul Campbell (PaulIA)
  4415. ; Modified.......:
  4416. ; Remarks .......:
  4417. ; Related .......:
  4418. ; Link ..........:
  4419. ; ===============================================================================================================================
  4420. Func __GDIPlus_PenDefDispose($iCurError = @error, $iCurExtended = @extended)
  4421. If $__g_hGDIPPen <> 0 Then
  4422. _GDIPlus_PenDispose($__g_hGDIPPen)
  4423. $__g_hGDIPPen = 0
  4424. EndIf
  4425. Return SetError($iCurError, $iCurExtended) ; restore caller @error and @extended
  4426. EndFunc ;==>__GDIPlus_PenDefDispose
  4427. ; #FUNCTION# ====================================================================================================================
  4428. ; Author ........: Eukalyptus
  4429. ; Modified ......: jpm
  4430. ; ===============================================================================================================================
  4431. Func _GDIPlus_BitmapApplyEffect($hBitmap, $hEffect, $tRECT = Null)
  4432. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, False)
  4433. If Not IsPtr($hEffect) Then Return SetError(10, 0, False)
  4434. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipBitmapApplyEffect", "handle", $hBitmap, "handle", $hEffect, "struct*", $tRECT, "int", 0, "ptr*", 0, "int*", 0)
  4435. If @error Then Return SetError(@error, @extended, 0)
  4436. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4437. Return True
  4438. EndFunc ;==>_GDIPlus_BitmapApplyEffect
  4439. ; #FUNCTION# ====================================================================================================================
  4440. ; Author ........: Eukalyptus
  4441. ; Modified ......: jpm
  4442. ; ===============================================================================================================================
  4443. Func _GDIPlus_BitmapApplyEffectEx($hBitmap, $hEffect, $iX = 0, $iY = 0, $iW = 0, $iH = 0)
  4444. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, False)
  4445. Local $tRECT = 0
  4446. If BitOR($iX, $iY, $iW, $iH) Then
  4447. $tRECT = DllStructCreate("int Left; int Top; int Right; int Bottom;")
  4448. DllStructSetData($tRECT, "Right", $iW + DllStructSetData($tRECT, "Left", $iX))
  4449. DllStructSetData($tRECT, "Bottom", $iH + DllStructSetData($tRECT, "Top", $iY))
  4450. EndIf
  4451. Local $iStatus = _GDIPlus_BitmapApplyEffect($hBitmap, $hEffect, $tRECT)
  4452. If Not $iStatus Then Return SetError(@error, @extended, False)
  4453. Return True
  4454. EndFunc ;==>_GDIPlus_BitmapApplyEffectEx
  4455. ; #FUNCTION# ====================================================================================================================
  4456. ; Author ........: Eukalyptus
  4457. ; Modified ......: jpm
  4458. ; ===============================================================================================================================
  4459. Func _GDIPlus_BitmapConvertFormat($hBitmap, $iPixelFormat, $iDitherType, $iPaletteType, $tPalette, $fAlphaThresholdPercent = 0.0)
  4460. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, False)
  4461. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipBitmapConvertFormat", "handle", $hBitmap, "uint", $iPixelFormat, "uint", $iDitherType, "uint", $iPaletteType, "struct*", $tPalette, "float", $fAlphaThresholdPercent)
  4462. If @error Then Return SetError(@error, @extended, False)
  4463. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4464. Return True
  4465. EndFunc ;==>_GDIPlus_BitmapConvertFormat
  4466. ; #FUNCTION# ====================================================================================================================
  4467. ; Author ........: Eukalyptus
  4468. ; Modified ......: jpm
  4469. ; ===============================================================================================================================
  4470. Func _GDIPlus_BitmapCreateApplyEffect($hBitmap, $hEffect, $tRECT = Null, $tOutRECT = Null)
  4471. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4472. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipBitmapCreateApplyEffect", "handle*", $hBitmap, "int", 1, "handle", $hEffect, "struct*", $tRECT, "struct*", $tOutRECT, "handle*", 0, "int", 0, "ptr*", 0, "int*", 0)
  4473. If @error Then Return SetError(@error, @extended, 0)
  4474. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  4475. Return $aResult[6]
  4476. EndFunc ;==>_GDIPlus_BitmapCreateApplyEffect
  4477. ; #FUNCTION# ====================================================================================================================
  4478. ; Author ........: Eukalyptus
  4479. ; Modified ......: jpm
  4480. ; ===============================================================================================================================
  4481. Func _GDIPlus_BitmapCreateApplyEffectEx($hBitmap, $hEffect, $iX = 0, $iY = 0, $iW = 0, $iH = 0)
  4482. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4483. Local $tRECT = 0
  4484. If BitOR($iX, $iY, $iW, $iH) Then
  4485. $tRECT = DllStructCreate("int Left; int Top; int Right; int Bottom;")
  4486. DllStructSetData($tRECT, "Right", $iW + DllStructSetData($tRECT, "Left", $iX))
  4487. DllStructSetData($tRECT, "Bottom", $iH + DllStructSetData($tRECT, "Top", $iY))
  4488. EndIf
  4489. Local $hBitmap_FX = _GDIPlus_BitmapCreateApplyEffect($hBitmap, $hEffect, $tRECT, Null)
  4490. Return SetError(@error, @extended, $hBitmap_FX)
  4491. EndFunc ;==>_GDIPlus_BitmapCreateApplyEffectEx
  4492. ; #FUNCTION# ====================================================================================================================
  4493. ; Author ........: UEZ
  4494. ; Modified ......: jpm
  4495. ; ===============================================================================================================================
  4496. Func _GDIPlus_BitmapGetHistogram($hBitmap, $iHistogramFormat, $iHistogramSize, $tChannel_0, $tChannel_1 = 0, $tChannel_2 = 0, $tChannel_3 = 0)
  4497. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, False)
  4498. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipBitmapGetHistogram", "handle", $hBitmap, "uint", $iHistogramFormat, "uint", $iHistogramSize, "struct*", $tChannel_0, "struct*", $tChannel_1, "struct*", $tChannel_2, "struct*", $tChannel_3)
  4499. If @error Then Return SetError(@error, @extended, False)
  4500. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4501. Return True
  4502. EndFunc ;==>_GDIPlus_BitmapGetHistogram
  4503. ; #FUNCTION# ====================================================================================================================
  4504. ; Author ........: Eukalyptus
  4505. ; Modified ......: jpm
  4506. ; ===============================================================================================================================
  4507. Func _GDIPlus_BitmapGetHistogramEx($hBitmap)
  4508. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4509. Local $iSize = _GDIPlus_BitmapGetHistogramSize($GDIP_HistogramFormatARGB)
  4510. Local $tHistogram = DllStructCreate("int Size; uint Red[" & $iSize & "]; uint MaxRed; uint Green[" & $iSize & "]; uint MaxGreen; uint Blue[" & $iSize & "]; uint MaxBlue; uint Alpha[" & $iSize & "]; uint MaxAlpha; uint Grey[" & $iSize & "]; uint MaxGrey;")
  4511. DllStructSetData($tHistogram, "Size", $iSize)
  4512. Local $iStatus = _GDIPlus_BitmapGetHistogram($hBitmap, $GDIP_HistogramFormatARGB, $iSize, DllStructGetPtr($tHistogram, "Alpha"), DllStructGetPtr($tHistogram, "Red"), DllStructGetPtr($tHistogram, "Green"), DllStructGetPtr($tHistogram, "Blue"))
  4513. If Not $iStatus Then Return SetError(@error, @extended, 0)
  4514. $iStatus = _GDIPlus_BitmapGetHistogram($hBitmap, $GDIP_HistogramFormatGray, $iSize, DllStructGetPtr($tHistogram, "Grey"))
  4515. If Not $iStatus Then Return SetError(@error + 10, @extended, 0)
  4516. Local $iMaxRed = 0, $iMaxGreen = 0, $iMaxBlue = 0, $iMaxAlpha = 0, $iMaxGrey = 0
  4517. For $i = 1 To $iSize
  4518. If DllStructGetData($tHistogram, "Red", $i) > $iMaxRed Then $iMaxRed = DllStructGetData($tHistogram, "Red", $i)
  4519. If DllStructGetData($tHistogram, "Green", $i) > $iMaxGreen Then $iMaxGreen = DllStructGetData($tHistogram, "Green", $i)
  4520. If DllStructGetData($tHistogram, "Blue", $i) > $iMaxBlue Then $iMaxBlue = DllStructGetData($tHistogram, "Blue", $i)
  4521. If DllStructGetData($tHistogram, "Alpha", $i) > $iMaxAlpha Then $iMaxAlpha = DllStructGetData($tHistogram, "Alpha", $i)
  4522. If DllStructGetData($tHistogram, "Grey", $i) > $iMaxGrey Then $iMaxGrey = DllStructGetData($tHistogram, "Grey", $i)
  4523. Next
  4524. DllStructSetData($tHistogram, "MaxRed", $iMaxRed)
  4525. DllStructSetData($tHistogram, "MaxGreen", $iMaxGreen)
  4526. DllStructSetData($tHistogram, "MaxBlue", $iMaxBlue)
  4527. DllStructSetData($tHistogram, "MaxAlpha", $iMaxAlpha)
  4528. DllStructSetData($tHistogram, "MaxGrey", $iMaxGrey)
  4529. Return $tHistogram
  4530. EndFunc ;==>_GDIPlus_BitmapGetHistogramEx
  4531. ; #FUNCTION# ====================================================================================================================
  4532. ; Author ........: UEZ
  4533. ; Modified ......: jpm
  4534. ; ===============================================================================================================================
  4535. Func _GDIPlus_BitmapGetHistogramSize($iFormat)
  4536. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4537. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipBitmapGetHistogramSize", "uint", $iFormat, "uint*", 0)
  4538. If @error Then Return SetError(@error, @extended, 0)
  4539. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  4540. Return $aResult[2]
  4541. EndFunc ;==>_GDIPlus_BitmapGetHistogramSize
  4542. ; #FUNCTION# ====================================================================================================================
  4543. ; Author ........: UEZ
  4544. ; Modified ......: jpm
  4545. ; ===============================================================================================================================
  4546. Func _GDIPlus_DrawImageFX($hGraphics, $hImage, $hEffect, $tRECTF = 0, $hMatrix = 0, $hImgAttributes = 0, $iUnit = 2)
  4547. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, False)
  4548. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDrawImageFX", "handle", $hGraphics, "handle", $hImage, "struct*", $tRECTF, "handle", $hMatrix, "handle", $hEffect, "handle", $hImgAttributes, "uint", $iUnit)
  4549. If @error Then Return SetError(@error, @extended, False)
  4550. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4551. Return True
  4552. EndFunc ;==>_GDIPlus_DrawImageFX
  4553. ; #FUNCTION# ====================================================================================================================
  4554. ; Author ........: Eukalyptus
  4555. ; Modified ......: jpm
  4556. ; ===============================================================================================================================
  4557. Func _GDIPlus_DrawImageFXEx($hGraphics, $hImage, $hEffect, $nX = 0, $nY = 0, $nW = 0, $nH = 0, $hMatrix = 0, $hImgAttributes = 0, $iUnit = 2)
  4558. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, False)
  4559. Local $tRECTF = 0
  4560. If BitOR($nX, $nY, $nW, $nH) Then $tRECTF = _GDIPlus_RectFCreate($nX, $nY, $nW, $nH)
  4561. Local $iStatus = _GDIPlus_DrawImageFX($hGraphics, $hImage, $hEffect, $tRECTF, $hMatrix, $hImgAttributes, $iUnit)
  4562. Return SetError(@error, @extended, $iStatus)
  4563. EndFunc ;==>_GDIPlus_DrawImageFXEx
  4564. ; #FUNCTION# ====================================================================================================================
  4565. ; Author ........: UEZ
  4566. ; Modified ......: jpm
  4567. ; ===============================================================================================================================
  4568. Func _GDIPlus_EffectCreate($sEffectGUID)
  4569. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4570. Local $tGUID = _WinAPI_GUIDFromString($sEffectGUID)
  4571. Local $aResult = 0
  4572. If @AutoItX64 Then
  4573. $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateEffect", "struct*", $tGUID, "handle*", 0)
  4574. If @error Then Return SetError(@error, @extended, 0)
  4575. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  4576. Return $aResult[2]
  4577. EndIf
  4578. Local $tElem = DllStructCreate("uint64[2];", DllStructGetPtr($tGUID))
  4579. $aResult = DllCall($__g_hGDIPDll, "int", "GdipCreateEffect", "uint64", DllStructGetData($tElem, 1, 1), "uint64", DllStructGetData($tElem, 1, 2), "handle*", 0)
  4580. If @error Then Return SetError(@error, @extended, 0)
  4581. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  4582. Return $aResult[3]
  4583. EndFunc ;==>_GDIPlus_EffectCreate
  4584. ; #FUNCTION# ====================================================================================================================
  4585. ; Author ........: UEZ
  4586. ; Modified ......: jpm
  4587. ; ===============================================================================================================================
  4588. Func _GDIPlus_EffectCreateBlur($fRadius = 10.0, $bExpandEdge = False)
  4589. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4590. Local $tEffectParameters = DllStructCreate($tagGDIP_EFFECTPARAMS_Blur)
  4591. DllStructSetData($tEffectParameters, "Radius", $fRadius)
  4592. DllStructSetData($tEffectParameters, "ExpandEdge", $bExpandEdge)
  4593. Local $hEffect = _GDIPlus_EffectCreate($GDIP_BlurEffectGuid)
  4594. If @error Then Return SetError(@error, @extended, 0)
  4595. _GDIPlus_EffectSetParameters($hEffect, $tEffectParameters)
  4596. If @error Then Return SetError(@error + 10, @extended, 0)
  4597. Return $hEffect
  4598. EndFunc ;==>_GDIPlus_EffectCreateBlur
  4599. ; #FUNCTION# ====================================================================================================================
  4600. ; Author ........: UEZ
  4601. ; Modified ......: jpm
  4602. ; ===============================================================================================================================
  4603. Func _GDIPlus_EffectCreateBrightnessContrast($iBrightnessLevel = 0, $iContrastLevel = 0)
  4604. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4605. Local $tEffectParameters = DllStructCreate($tagGDIP_EFFECTPARAMS_BrightnessContrast)
  4606. DllStructSetData($tEffectParameters, "BrightnessLevel", $iBrightnessLevel)
  4607. DllStructSetData($tEffectParameters, "ContrastLevel", $iContrastLevel)
  4608. Local $hEffect = _GDIPlus_EffectCreate($GDIP_BrightnessContrastEffectGuid)
  4609. If @error Then Return SetError(@error, @extended, 0)
  4610. _GDIPlus_EffectSetParameters($hEffect, $tEffectParameters)
  4611. If @error Then Return SetError(@error + 10, @extended, 0)
  4612. Return $hEffect
  4613. EndFunc ;==>_GDIPlus_EffectCreateBrightnessContrast
  4614. ; #FUNCTION# ====================================================================================================================
  4615. ; Author ........: UEZ
  4616. ; Modified ......: jpm
  4617. ; ===============================================================================================================================
  4618. Func _GDIPlus_EffectCreateColorBalance($iCyanRed = 0, $iMagentaGreen = 0, $iYellowBlue = 0)
  4619. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4620. Local $tEffectParameters = DllStructCreate($tagGDIP_EFFECTPARAMS_ColorBalance)
  4621. DllStructSetData($tEffectParameters, "CyanRed", $iCyanRed)
  4622. DllStructSetData($tEffectParameters, "MagentaGreen", $iMagentaGreen)
  4623. DllStructSetData($tEffectParameters, "YellowBlue", $iYellowBlue)
  4624. Local $hEffect = _GDIPlus_EffectCreate($GDIP_ColorBalanceEffectGuid)
  4625. If @error Then Return SetError(@error, @extended, 0)
  4626. _GDIPlus_EffectSetParameters($hEffect, $tEffectParameters)
  4627. If @error Then Return SetError(@error + 10, @extended, 0)
  4628. Return $hEffect
  4629. EndFunc ;==>_GDIPlus_EffectCreateColorBalance
  4630. ; #FUNCTION# ====================================================================================================================
  4631. ; Author ........: UEZ
  4632. ; Modified ......: jpm
  4633. ; ===============================================================================================================================
  4634. Func _GDIPlus_EffectCreateColorCurve($iAdjustment, $iChannel, $iAdjustValue)
  4635. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4636. Local $tEffectParameters = DllStructCreate($tagGDIP_EFFECTPARAMS_ColorCurve)
  4637. DllStructSetData($tEffectParameters, "Adjustment", $iAdjustment)
  4638. DllStructSetData($tEffectParameters, "Channel", $iChannel)
  4639. DllStructSetData($tEffectParameters, "AdjustValue", $iAdjustValue)
  4640. Local $hEffect = _GDIPlus_EffectCreate($GDIP_ColorCurveEffectGuid)
  4641. If @error Then Return SetError(@error, @extended, 0)
  4642. _GDIPlus_EffectSetParameters($hEffect, $tEffectParameters)
  4643. If @error Then Return SetError(@error + 10, @extended, 0)
  4644. Return $hEffect
  4645. EndFunc ;==>_GDIPlus_EffectCreateColorCurve
  4646. ; #FUNCTION# ====================================================================================================================
  4647. ; Author ........: UEZ
  4648. ; Modified ......: jpm
  4649. ; ===============================================================================================================================
  4650. Func _GDIPlus_EffectCreateColorLUT($aColorLUT)
  4651. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4652. Local $tEffectParameters = DllStructCreate($tagGDIP_EFFECTPARAMS_ColorLUT)
  4653. For $iI = 0 To 255
  4654. DllStructSetData($tEffectParameters, "LutA", $aColorLUT[$iI][0], $iI + 1)
  4655. DllStructSetData($tEffectParameters, "LutR", $aColorLUT[$iI][1], $iI + 1)
  4656. DllStructSetData($tEffectParameters, "LutG", $aColorLUT[$iI][2], $iI + 1)
  4657. DllStructSetData($tEffectParameters, "LutB", $aColorLUT[$iI][3], $iI + 1)
  4658. Next
  4659. Local $hEffect = _GDIPlus_EffectCreate($GDIP_ColorLUTEffectGuid)
  4660. If @error Then Return SetError(@error, @extended, 0)
  4661. _GDIPlus_EffectSetParameters($hEffect, $tEffectParameters)
  4662. If @error Then Return SetError(@error + 10, @extended, 0)
  4663. Return $hEffect
  4664. EndFunc ;==>_GDIPlus_EffectCreateColorLUT
  4665. ; #FUNCTION# ====================================================================================================================
  4666. ; Author ........: UEZ
  4667. ; Modified ......: jpm
  4668. ; ===============================================================================================================================
  4669. Func _GDIPlus_EffectCreateColorMatrix($tColorMatrix)
  4670. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4671. Local $hEffect = _GDIPlus_EffectCreate($GDIP_ColorMatrixEffectGuid)
  4672. If @error Then Return SetError(@error, @extended, 0)
  4673. _GDIPlus_EffectSetParameters($hEffect, $tColorMatrix)
  4674. If @error Then Return SetError(@error + 10, @extended, 0)
  4675. Return $hEffect
  4676. EndFunc ;==>_GDIPlus_EffectCreateColorMatrix
  4677. ; #FUNCTION# ====================================================================================================================
  4678. ; Author ........: UEZ
  4679. ; Modified ......: jpm
  4680. ; ===============================================================================================================================
  4681. Func _GDIPlus_EffectCreateHueSaturationLightness($iHueLevel = 0, $iSaturationLevel = 0, $iLightnessLevel = 0)
  4682. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4683. Local $tEffectParameters = DllStructCreate($tagGDIP_EFFECTPARAMS_HueSaturationLightness)
  4684. DllStructSetData($tEffectParameters, "HueLevel", $iHueLevel)
  4685. DllStructSetData($tEffectParameters, "SaturationLevel", $iSaturationLevel)
  4686. DllStructSetData($tEffectParameters, "LightnessLevel", $iLightnessLevel)
  4687. Local $hEffect = _GDIPlus_EffectCreate($GDIP_HueSaturationLightnessEffectGuid)
  4688. If @error Then Return SetError(@error, @extended, 0)
  4689. _GDIPlus_EffectSetParameters($hEffect, $tEffectParameters)
  4690. If @error Then Return SetError(@error + 10, @extended, 0)
  4691. Return $hEffect
  4692. EndFunc ;==>_GDIPlus_EffectCreateHueSaturationLightness
  4693. ; #FUNCTION# ====================================================================================================================
  4694. ; Author ........: UEZ
  4695. ; Modified ......: jpm
  4696. ; ===============================================================================================================================
  4697. Func _GDIPlus_EffectCreateLevels($iHighlight = 100, $iMidtone = 0, $iShadow = 0)
  4698. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4699. Local $tEffectParameters = DllStructCreate($tagGDIP_EFFECTPARAMS_Levels)
  4700. DllStructSetData($tEffectParameters, "Highlight", $iHighlight)
  4701. DllStructSetData($tEffectParameters, "Midtone", $iMidtone)
  4702. DllStructSetData($tEffectParameters, "Shadow", $iShadow)
  4703. Local $hEffect = _GDIPlus_EffectCreate($GDIP_LevelsEffectGuid)
  4704. If @error Then Return SetError(@error, @extended, 0)
  4705. _GDIPlus_EffectSetParameters($hEffect, $tEffectParameters)
  4706. If @error Then Return SetError(@error + 10, @extended, 0)
  4707. Return $hEffect
  4708. EndFunc ;==>_GDIPlus_EffectCreateLevels
  4709. ; #FUNCTION# ====================================================================================================================
  4710. ; Author ........: UEZ
  4711. ; Modified ......: jpm
  4712. ; ===============================================================================================================================
  4713. Func _GDIPlus_EffectCreateRedEyeCorrection($aAreas)
  4714. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4715. Local $iCount = $aAreas[0][0]
  4716. Local $tAreas = DllStructCreate("long[" & $iCount * 4 & "]")
  4717. For $iI = 1 To $iCount
  4718. DllStructSetData($tAreas, 1, DllStructSetData($tAreas, 1, $aAreas[$iI][0], (($iI - 1) * 4) + 1) + $aAreas[$iI][2], (($iI - 1) * 4) + 3)
  4719. DllStructSetData($tAreas, 1, DllStructSetData($tAreas, 1, $aAreas[$iI][1], (($iI - 1) * 4) + 2) + $aAreas[$iI][3], (($iI - 1) * 4) + 4)
  4720. Next
  4721. Local $tEffectParameters = DllStructCreate($tagGDIP_EFFECTPARAMS_RedEyeCorrection)
  4722. DllStructSetData($tEffectParameters, "NumberOfAreas", $iCount)
  4723. DllStructSetData($tEffectParameters, "Areas", DllStructGetPtr($tAreas))
  4724. Local $hEffect = _GDIPlus_EffectCreate($GDIP_RedEyeCorrectionEffectGuid)
  4725. If @error Then Return SetError(@error, @extended, 0)
  4726. _GDIPlus_EffectSetParameters($hEffect, $tEffectParameters, (DllStructGetSize($tAreas) + DllStructGetSize($tEffectParameters)) / DllStructGetSize($tEffectParameters))
  4727. If @error Then Return SetError(@error + 10, @extended, 0)
  4728. Return $hEffect
  4729. EndFunc ;==>_GDIPlus_EffectCreateRedEyeCorrection
  4730. ; #FUNCTION# ====================================================================================================================
  4731. ; Author ........: UEZ
  4732. ; Modified ......: jpm
  4733. ; ===============================================================================================================================
  4734. Func _GDIPlus_EffectCreateSharpen($fRadius = 10.0, $fAmount = 50.0)
  4735. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4736. Local $tEffectParameters = DllStructCreate($tagGDIP_EFFECTPARAMS_Sharpen)
  4737. DllStructSetData($tEffectParameters, "Radius", $fRadius)
  4738. DllStructSetData($tEffectParameters, "Amount", $fAmount)
  4739. Local $hEffect = _GDIPlus_EffectCreate($GDIP_SharpenEffectGuid)
  4740. If @error Then Return SetError(@error, @extended, 0)
  4741. _GDIPlus_EffectSetParameters($hEffect, $tEffectParameters)
  4742. If @error Then Return SetError(@error + 10, @extended, 0)
  4743. Return $hEffect
  4744. EndFunc ;==>_GDIPlus_EffectCreateSharpen
  4745. ; #FUNCTION# ====================================================================================================================
  4746. ; Author ........: UEZ
  4747. ; Modified ......: jpm
  4748. ; ===============================================================================================================================
  4749. Func _GDIPlus_EffectCreateTint($iHue = 0, $iAmount = 0)
  4750. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4751. Local $tEffectParameters = DllStructCreate($tagGDIP_EFFECTPARAMS_Tint)
  4752. DllStructSetData($tEffectParameters, "Hue", $iHue)
  4753. DllStructSetData($tEffectParameters, "Amount", $iAmount)
  4754. Local $hEffect = _GDIPlus_EffectCreate($GDIP_TintEffectGuid)
  4755. If @error Then Return SetError(@error, @extended, 0)
  4756. _GDIPlus_EffectSetParameters($hEffect, $tEffectParameters)
  4757. If @error Then Return SetError(@error + 10, @extended, 0)
  4758. Return $hEffect
  4759. EndFunc ;==>_GDIPlus_EffectCreateTint
  4760. ; #FUNCTION# ====================================================================================================================
  4761. ; Author ........: UEZ
  4762. ; Modified ......: jpm
  4763. ; ===============================================================================================================================
  4764. Func _GDIPlus_EffectDispose($hEffect)
  4765. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, False)
  4766. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipDeleteEffect", "handle", $hEffect)
  4767. If @error Then Return SetError(@error, @extended, 0)
  4768. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4769. Return True
  4770. EndFunc ;==>_GDIPlus_EffectDispose
  4771. ; #FUNCTION# ====================================================================================================================
  4772. ; Author ........: Eukalyptus
  4773. ; Modified ......: jpm
  4774. ; ===============================================================================================================================
  4775. Func _GDIPlus_EffectGetParameters($hEffect, $tEffectParameters)
  4776. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, False)
  4777. If DllStructGetSize($tEffectParameters) < __GDIPlus_EffectGetParameterSize($hEffect) Then Return SetError(2, 5, False)
  4778. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetEffectParameters", "handle", $hEffect, "uint*", DllStructGetSize($tEffectParameters), "struct*", $tEffectParameters)
  4779. If @error Then Return SetError(@error, @extended, False)
  4780. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4781. Return True
  4782. EndFunc ;==>_GDIPlus_EffectGetParameters
  4783. ; #INTERNAL_USE_ONLY# ===========================================================================================================
  4784. ; Name ..........: __GDIPlus_EffectGetParameterSize
  4785. ; Description ...: Gets the total size, in bytes, of the parameters currently set for the specified effect
  4786. ; Syntax ........: __GDIPlus_EffectGetParameterSize($hEffect)
  4787. ; Parameters ....: $hEffect - Handle to an Effect object
  4788. ; Return values .: Success - the size in Bytes.
  4789. ; Failure - -1 and sets the @error flag to non-zero, @extended may contain GPSTATUS error code ($GPID_ERR*).
  4790. ; Author ........: Eukalyptus
  4791. ; Modified ......:
  4792. ; Remarks .......:
  4793. ; Related .......: _GDIPlus_EffectCreate, _GDIPlus_EffectGetParameters
  4794. ; Link ..........: @@MsdnLink@@ GdipGetEffectParameterSize
  4795. ; Example .......: No
  4796. ; ===============================================================================================================================
  4797. Func __GDIPlus_EffectGetParameterSize($hEffect)
  4798. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, -1)
  4799. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetEffectParameterSize", "handle", $hEffect, "uint*", 0)
  4800. If @error Then Return SetError(@error, @extended, -1)
  4801. If $aResult[0] Then Return SetError(10, $aResult[0], -1)
  4802. Return $aResult[2]
  4803. EndFunc ;==>__GDIPlus_EffectGetParameterSize
  4804. ; #FUNCTION# ====================================================================================================================
  4805. ; Author ........: UEZ
  4806. ; Modified ......: jpm
  4807. ; ===============================================================================================================================
  4808. Func _GDIPlus_EffectSetParameters($hEffect, $tEffectParameters, $iSizeAdjust = 1)
  4809. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, False)
  4810. Local $iSize = __GDIPlus_EffectGetParameterSize($hEffect)
  4811. If @error Then Return SetError(@error, @extended, False)
  4812. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSetEffectParameters", "handle", $hEffect, "struct*", $tEffectParameters, "uint", $iSize * $iSizeAdjust)
  4813. If @error Then Return SetError(@error, @extended, False)
  4814. If $aResult[0] Then Return SetError(10, $aResult[0], False)
  4815. Return True
  4816. EndFunc ;==>_GDIPlus_EffectSetParameters
  4817. ; #FUNCTION# ====================================================================================================================
  4818. ; Author ........: Eukalyptus
  4819. ; Modified ......: jpm
  4820. ; ===============================================================================================================================
  4821. Func _GDIPlus_PaletteInitialize($iEntries, $iPaletteType = $GDIP_PaletteTypeOptimal, $iOptimalColors = 0, $bUseTransparentColor = True, $hBitmap = Null)
  4822. If $__g_bGDIP_V1_0 Then Return SetError(-1, 0, 0)
  4823. If $iOptimalColors > 0 Then $iPaletteType = $GDIP_PaletteTypeOptimal
  4824. Local $tPalette = DllStructCreate("uint Flags; uint Count; uint ARGB[" & $iEntries & "];")
  4825. DllStructSetData($tPalette, "Flags", $iPaletteType)
  4826. DllStructSetData($tPalette, "Count", $iEntries)
  4827. Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipInitializePalette", "struct*", $tPalette, "uint", $iPaletteType, "uint", $iOptimalColors, "bool", $bUseTransparentColor, "handle", $hBitmap)
  4828. If @error Then Return SetError(@error, @extended, 0)
  4829. If $aResult[0] Then Return SetError(10, $aResult[0], 0)
  4830. Return $tPalette
  4831. EndFunc ;==>_GDIPlus_PaletteInitialize