AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GDI+ standard library 1.30 by tic
Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 22, 23, 24  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Lexikos



Joined: 17 Oct 2006
Posts: 4469
Location: Qld, Australia

PostPosted: Sun Feb 08, 2009 10:20 pm    Post subject: Reply with quote

If I knew, I would've posted already.
Back to top
View user's profile Send private message Visit poster's website
Nicklea
Guest





PostPosted: Mon Feb 09, 2009 2:35 pm    Post subject: Reply with quote

I appreciate your courtesy anyhow. Very Happy


@Everyone
So far, I have been looking into Colour Matrix to meet my goals, however that may or may not be right. Hopefully it is. Hopefully there is a solution. I am dreading having to re-purpose thousands of color object shapes, and trying to come up with a automated 'colour overlay'. Smile ... so I can make a Red/Green/Blue become totally Blue, or a Rainbow become just Green, by transforming pixels Wink

I'd be looking forward to seeing what Tic comes up with in his magic labs! Idea Idea [color]Thanks![/color]
Back to top
Smurth



Joined: 13 Dec 2006
Posts: 104

PostPosted: Thu Feb 12, 2009 4:44 am    Post subject: Reply with quote

Does anybody know how to get a copy of the desktop window, without all the opened windows; in fact, just the wallpaper ?
Back to top
View user's profile Send private message
Guest






PostPosted: Wed Feb 18, 2009 5:39 pm    Post subject: Reply with quote

Smurth wrote:
Does anybody know how to get a copy of the desktop window, without all the opened windows; in fact, just the wallpaper ?
and the icons?
Back to top
tic



Joined: 22 Apr 2007
Posts: 1458

PostPosted: Mon Feb 23, 2009 7:44 pm    Post subject: Reply with quote

Sorry all......I will get round to doing everything shortly.....busy with life/work Smile
Back to top
View user's profile Send private message
Krogdor



Joined: 18 Apr 2008
Posts: 1381
Location: The Interwebs

PostPosted: Sun Mar 01, 2009 6:15 am    Post subject: Reply with quote

I was wondering how it would be possible to load a specific icon from a .ico file using Gdip, instead of loading the first image in the file? It's a bit inconvenient to be only able to see the first (and generally smallest) image!
I tried searching MSDN, but the Gdip API seems very limited...


Smurth wrote:
Does anybody know how to get a copy of the desktop window, without all the opened windows; in fact, just the wallpaper ?


Look in the registry; I believe the current wallpaper is located in the HKCU root key, Subkey Control Panel\Desktop, either the OriginalWallpaper or the Wallpaper value...
Back to top
View user's profile Send private message AIM Address
Smurth



Joined: 13 Dec 2006
Posts: 104

PostPosted: Sun Mar 01, 2009 8:25 pm    Post subject: Reply with quote

Krogdor wrote:
I believe the current wallpaper is located in the HKCU root key, Subkey Control Panel\Desktop, either the OriginalWallpaper or the Wallpaper value...


Yes, I know that Smile
I'd prefer take the wallpaper directly from memory. I can do this with gdi but I'm not able to reproduce it with gdi+ Sad
Back to top
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 4469
Location: Qld, Australia

PostPosted: Sun Mar 08, 2009 5:59 am    Post subject: Reply with quote

tic, I've found another flat API function which may be useful enough to add to gdip.ahk:
Code:
GpStatus WINGDIPAPI
GdipImageRotateFlip(GpImage *image, RotateFlipType rfType);
Corresponds to Image::RotateFlip.
Back to top
View user's profile Send private message Visit poster's website
dominique dutoit



Joined: 20 Feb 2009
Posts: 12
Location: France

PostPosted: Mon Mar 09, 2009 8:30 pm    Post subject: Gdip and ie4AHK Reply with quote

Hello,

I think about include the main window of IE4AHK (not the menu, not the tool bar, not the status, only the included content: a web page with its viewer) into Gdip.ahk form , for instance the form#10 of the tutorial.

Is it possible? Is somebody tried to do it in order to design a personal nice browser, without standard window. Something more "graphic".

Elsewhere, is it possible to program the resizing of the window example #10?

I will be very very happy if somebody has these two programs.

Thank for your reply.

Dominique
_________________
dominique
www.sensagent.com
Back to top
View user's profile Send private message
Nicklea
Guest





PostPosted: Wed Mar 11, 2009 4:24 pm    Post subject: Reply with quote

Hi! Has anyone been able to figure out how to do the colour overlay thing? It seems logical the colour matrix described by Tic is the way to go (maybe not)...but I have tried many combinations of the function. I think I am doing it wrong! I can't get the function to do anything. I don't know why... Sad


Just to re-cap the vision I am hoping for: Re-draw bitmaps into one solid color I specify, while preserving transparency levels. Meaning, basically the complexity of a image is irrelevant. I just want to turn each pixel in a image into a flat single color. Smile Smile
Back to top
TheGood



Joined: 30 Jul 2007
Posts: 399

PostPosted: Tue Mar 24, 2009 12:12 am    Post subject: Reply with quote

tic, I'm currently developing a little app that will use your functions.
I just wanted to say thanks for wrapping it up so nicely (one might even say "in AHK spirit"). And also thanks for the very detailed examples (I know next to nothing about GDI+).

Also, your idea of PostMessaging WM_NCLBUTTONDOWN to the title bar to move the GUI is ingenious!
Back to top
View user's profile Send private message Visit poster's website
TheGood



Joined: 30 Jul 2007
Posts: 399

PostPosted: Tue Mar 24, 2009 5:39 pm    Post subject: Reply with quote

I have a question. When you want to update the GUI, do you have to redraw everything, or is there a way to only redraw and refresh a portion of the GUI?

Is it efficient to redraw the whole GUI every time when only a small part of it is changing?
Back to top
View user's profile Send private message Visit poster's website
Smurth



Joined: 13 Dec 2006
Posts: 104

PostPosted: Tue Mar 24, 2009 11:40 pm    Post subject: Reply with quote

I guess you should redraw all the gui Sad
But you can build the basic layout and store it into a bitmap, then use that bitmap, change what needs to be, and update the gui. It's eating some memory but save cpu time.
It's up to you to choose what you want to sacrifice...
Back to top
View user's profile Send private message
TheGood



Joined: 30 Jul 2007
Posts: 399

PostPosted: Wed Mar 25, 2009 5:54 pm    Post subject: Reply with quote

Smurth wrote:
But you can build the basic layout and store it into a bitmap, then use that bitmap, change what needs to be, and update the gui.


I see. How would I do that?
It would mean that I would have to copy the original bitmap before using it in SelectObject(), right? So, how do I copy a bitmap?

Sorry for the noobness, lol.

Edit: OK, so the value returned by CreateDIBSection is a pointer to the bitmap. But how do I know the size of the bitmap if I want to copy it to another variable?
Back to top
View user's profile Send private message Visit poster's website
Smurth



Joined: 13 Dec 2006
Posts: 104

PostPosted: Wed Mar 25, 2009 6:57 pm    Post subject: Reply with quote

I've done this like that:

Code:
BGUpdate()
{
; hBG need to be save between redraws to save cpu time
Static hBG

   ; create the needed stuff as usual
   hbm := CreateDIBSection(w, h)
   hdc := CreateCompatibleDC()
   obm := SelectObject(hdc, hbm)
   G := Gdip_GraphicsFromHDC(hdc)
   
   if not hBG {
      hBG := Gdip_CreateBitmap(w,h)
      pBG := Gdip_GraphicsFromImage(hBG)
      ; draw the initial stuff onto pBG
      ; ...
      
      ; then delete pBG (as we don't need it anymore)
      Gdip_DeleteGraphics(pBG)
   }
   ; draw the previously stored hBG onto G)
   Gdip_DrawImage(G, hBG, 0, 0, w, h, 0, 0, w, h)
   ; draw what need to be added
   ; ...
   UpdateLayeredWindow(hWnd, hdc, x, y, w, h)
   
   ; delete the stuff as usual
   SelectObject(hdc, obm)
   DeleteObject(hbm)
   DeleteDC(hdc)
   Gdip_DeleteGraphics(G)

}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 22, 23, 24  Next
Page 14 of 24

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group