trancexx Posted November 3, 2010 Posted November 3, 2010 (edited) Direct2D is one of the new things that was implemented in Windows 7. Completely new technology built in the Microsoft factory.You could say that GDI/GDI+ era ended with Windows 7, and guess what - you would be right.Sooner you switch to Direct2D, the better. If you refuse however, you will be kicked off the field, not by the future but by the present time. May sound hard but that's the way things are. Just when you though you had something... In AutoIt's implementation of the Direct2D you would need AutoitObject since this is COM based technology.What I'm introducing here is interface file. This file holds the definition of the interface (any kind, not just Direct2D). Extension is intfc. This file is interpreted by the AutoIt's interpreter (executable) just as any au3 file, but it's not au3. It's added to scripts with #include directive (should be done below #include "AutoitObject.au3" line). People that have will can submit their interface files to me (trancexx at yahoo dot com) and I will add them to the AutoItObject package if they would meet required standards. You can use Direct2D.intfc as template (pay attention to organization of that file).Anyway, Direct2D in AutoIt with few examples (Windows Animation and DirectWrite included).Direct2D.zipThis is new to me too so don't be too harsh.My advice to you is to at least get familiar with Direct2D. I'm serious.edit: examples with correct objects releasing Edited March 12, 2011 by trancexx ♡♡♡ . eMyvnE
UEZ Posted November 3, 2010 Posted November 3, 2010 Wow, after D3D now D2D. I'm enthused. The question is now, which one is the best regarding complexity to learn, perfomance, etc. If I understood both stuff I will do a benchmark to see the difference. Well done trancexx! Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Ascend4nt Posted November 3, 2010 Posted November 3, 2010 Hah, I thought that Direct2D was referring to DirectDraw, so I was a bit confused. But looking into it, I can see how it works differently.. that and the new DirectWrite basically make simple text/shapes easier (and faster) to implement. Anyway, kudos to you for keeping up with the DirectX interface. One day I'll find a use for it, I suppose.. though not in the AutoIt era (maybe a new phoenix will rise eh) My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code)
trancexx Posted November 3, 2010 Author Posted November 3, 2010 Yes, DirectWrite is brilliantly advanced, I have some scripts, maybe I post them if no one else would.I'm glad you were one of those who were able to get me. ♡♡♡ . eMyvnE
Mat Posted November 3, 2010 Posted November 3, 2010 I think that oo is definitely going to be needed in AutoIt for it to keep up... This is another example of that. Maybe you were right saying that it will soon be a 'dead' language. Works on vista though AutoIt Project Listing
AdmiralAlkex Posted November 3, 2010 Posted November 3, 2010 Works on vista though With the platform update, yes. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
trancexx Posted November 3, 2010 Author Posted November 3, 2010 I think that oo is definitely going to be needed in AutoIt for it to keep up... This is another example of that. Maybe you were right saying that it will soon be a 'dead' language. Works on vista though MSDN says "Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista". That's great, they have added it to an older OS. Speaks of importance.About the implementation, considering the capability it would be best to process WM_ERASEBKGND and return 0 from it and keep only WM_PAINT. And forget most of the AutoIt GUI... stuff. ♡♡♡ . eMyvnE
trancexx Posted November 4, 2010 Author Posted November 4, 2010 (edited) I've added another example just to show what I meant with WM_ERASEBKGND. It's more complex too, with stroke and other things like the net in the background and gradient for example. edit: try resizing now. Edited November 4, 2010 by trancexx ♡♡♡ . eMyvnE
taietel Posted November 4, 2010 Posted November 4, 2010 (edited) Thanks! 5 stars.Now I try to understand the code ... how and why... [edit] ... Edited November 8, 2010 by taietel Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text
trancexx Posted November 8, 2010 Author Posted November 8, 2010 (edited) I've added few more examples if you would be interested. Example5 includes Windows Animation (another new thing). Animation of the background color changing fired on mouse click. Few interface definitions added to the package for easier manipulation with the objects. Also, custom interface implementation example for handling different events included (needles to say; must try!). Believe it or not, this pushes AutoIt to be ...meh, whatever. Who cares anyway. Edited November 8, 2010 by trancexx ♡♡♡ . eMyvnE
Moderators Melba23 Posted November 8, 2010 Moderators Posted November 8, 2010 trancexx, I get a file with no extension extracted from the zip. I am sure that is not what should happen. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
AdmiralAlkex Posted November 8, 2010 Posted November 8, 2010 I just tried the new examples, very cool. Did example 4 get lost? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
trancexx Posted November 8, 2010 Author Posted November 8, 2010 (edited) Apparently yes. No, it wasn't much so I dropped it. btw, thanks for the feedback. Edited November 8, 2010 by trancexx ♡♡♡ . eMyvnE
Moderators Melba23 Posted November 8, 2010 Moderators Posted November 8, 2010 trancexx, The file was seemingly double zipped - renaming the extracted file with a zip extension allowed me to finally extract the files. Clever stuff from you as always - although it does make my head hurt looking at the code. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
trancexx Posted November 8, 2010 Author Posted November 8, 2010 It shouldn't be double zipped. It's just zipped folder (not file) containing examples and other things. ♡♡♡ . eMyvnE
UEZ Posted November 8, 2010 Posted November 8, 2010 Also to you, thanks for the update! Great work as usual! Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
trancexx Posted November 15, 2010 Author Posted November 15, 2010 Once upon a time, there was... - that's a line from example No4. It shows how to draw text using DirectWrite.So, there are 5 examples now showing the basics of Direct2D, DirectWrite and Windows Animation.New version of AutoItObject v1.2.1.0, viz. included in the zip from the first post, is required. Don't miss this release, it's totally groovy! Visit http://autoitobject.origo.ethz.ch/ (mainly download section) to see why. ♡♡♡ . eMyvnE
AdmiralAlkex Posted November 15, 2010 Posted November 15, 2010 until the end of their days... .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
trancexx Posted November 15, 2010 Author Posted November 15, 2010 Yep, that's how that fairy tale goes. ♡♡♡ . eMyvnE
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now