PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   HTC Apache (http://forum.ppcgeeks.com/forumdisplay.php?f=14)
-   -   For those looking to skin your dialer (TDial 1.1.0, 12-09-07) (http://forum.ppcgeeks.com/showthread.php?t=7819)

tiermann 09-06-2007 11:27 PM

Code:

Public Function CaptureRectangle(ByVal bmp As Bitmap, ByVal CapRect As Rectangle, ByVal CapRectWidth As Integer, ByVal CapRectHeight As Integer) As Bitmap
        Dim bmpImage As Bitmap = bmp
        Dim bmpCrop As New Bitmap(CapRectWidth, CapRectHeight)
        Dim recCrop As New Rectangle(CapRect.X, CapRect.Y, CapRectWidth, CapRectHeight)
        Dim gphCrop As Graphics = Graphics.FromImage(bmpCrop)
        Dim recDest As New Rectangle(0, 0, CapRectWidth, CapRectHeight)
        Dim attr As New System.Drawing.Imaging.ImageAttributes
        gphCrop.DrawImage(bmpImage, recDest, recCrop.X, recCrop.Y, recCrop.Width, recCrop.Height, GraphicsUnit.Pixel, attr)

        gphCrop.Dispose()
        Return bmpCrop

    End Function

That will return a bitmap cropped out of the original image at the start position and width/height specified. Usage is like...

'Define these to the section you want to crop out of the picture
Dim startX, startY, cWidth, cHeight as Integer

Dim oldbmp as Bitmap = new Bitmap("C:\MyPicture.jpg")
Dim newbmp as Bitmap = captureRectangle(oldbmp, new Rectangle(startX,StartY,cWidth,cHeight), cWidth, cHeight)

tiermann 09-07-2007 08:11 AM

Update: (b1.06)
-Rearranged the menu bar a bit to add options for "Always Stretch", "Always Resample", and "Always Ask". There's also a checkbox on the dialog that pops up so you don't have to choose every time. Saves the setting to registry (HKCU\Software\TierMann\TDialDesigner).

Ruinit 09-07-2007 11:26 AM

I cannot seem to find the program on your ftp? And the link in your sig takes you to an error page.

Thanks

tiermann 09-07-2007 01:07 PM

Sorry. Don't know why, but I think my account is suspended on that server. I'll attach b1.06 for now and try to find someplace to move my page.

Maybe I got too many hits from putting up that WM6 mirror list :P


Edit: The site is back up. Maybe their server just broke for a while.

Newer version is in my sig.

Ruinit 09-07-2007 04:02 PM

Sweet thanks!

Now if I could figure out a way to make the Caller ID larger so my old eyes could see it :) Oh and also ear piece volume .... lol

tiermann 09-07-2007 05:49 PM

Things to come..

http://img511.imageshack.us/img511/8518/untitledxq2.jpg

I made a new button set, but I'll put that out later tonight. I still haven't added the code to generate the "downbuttons" yet since there were no other button sets before. You will have the option to pick all the colors and blending for the down buttons as well.

tiermann 09-08-2007 09:04 AM

Update: (b1.08 )
-All settings except "Style" and Background Image can be saved for next run. (See the File menu)
You can choose to "Save Current Settings" or have it save every time you exit.
I thought this would be a useful addition since the amount of options has increased so much since the beginning.
-TDialDesigner uses a "TDial.ini" file now for settings instead of the registry so you'll have to choose what type of resizing you want for the background images again. I did this for people who like the whole application and settings to be portable for usb keys, etc. Also, if you want to go back to stock settings you can always delete the TDial.ini and restart the app.

PS: I just realized that I forgot to have it load the setting for "Hide Carrier Logo/Text" from the ini, but that's minor. I'll fix for next time.


Big Update: (b1.07)
-New "TahomaDigits" button set included. Look in Options->Styles
-It now generates downbuttons.
-You can pick the colors and alpha of the downbuttons as well.
-All buttons on the dialer preview pictures are clickable now. When the left mousebutton is down over one of the digits it will show you the downbutton image.


Before anyone asks, this is not a bug...
On the progress screen, if you click a button other than the "talk" button, the background for the downbutton is a solid color. This is because the dialer itself uses the same image for those 5 command buttons so I can't have it draw the background on the button (it wouldn't line up with the bg image and they'd all the same cutout). If you wish to have a transparent bg for down buttons on the progress screen, leave the progress bg alpha for downbutton at 0%.

This pic shows the new layout with my mouse down over the 5 button...
http://img365.imageshack.us/img365/6876/untitledbx2.png

Let me know if there are any bugs, like your dialer not coming out how you wanted it to, etc. I changed a lot of code around so I may have missed something.

Ruinit 09-08-2007 01:57 PM

Great work! I like the larger number style. A question though. I want to edit the status box but find that you can not change it without using some kind of picture. Could that be set to a color as well? I hate the blue background this dialer comes with now.

I noticed that you lose the letters with the fatter digits but looks like there is space to run them vertically to the right of the digits? For those that need the letters

Ruinit 09-08-2007 02:24 PM

Sorry but before I put on my first skin. I have a folder called MySkin that I saved. Where do I put that whole folder? Or do I just copy the files you have listed in the first post?

Thanks

Never mind this post copied all files from MySkin into \windows overwriting every thing and it works fine :)

tiermann 09-08-2007 05:08 PM

Quote:

Originally Posted by Ruinit (Post 84519)
Great work! I like the larger number style. A question though. I want to edit the status box but find that you can not change it without using some kind of picture. Could that be set to a color as well? I hate the blue background this dialer comes with now.

The status box is drawn onto the default background so that's why it can't be changed without a new background. There's no real point to alpha-blending if the same image is right behind it ;).

Quote:

Originally Posted by Ruinit (Post 84519)
I noticed that you lose the letters with the fatter digits but looks like there is space to run them vertically to the right of the digits? For those that need the letters

That's the idea of the styles :) That particular one is for those who don't need the letters. I could do one with letters too, or someone else could take a shot at it if they like.


PS: I see you figured it out. All the files go directly into \Windows.


All times are GMT -4. The time now is 02:13 AM.

Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0