NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 21 22 23 24 25 … 93 Next »
GBPVRLibrary - Open Source Components

 
  • 0 Vote(s) - 0 Average
GBPVRLibrary - Open Source Components
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#31
2008-12-23, 04:34 PM
The approach for the WizTools UI elements was to introduce common and well known UI elements to gbpvr development. These elements include: Label, Textbox, List, Button, ButtonList, with methods and properties that are also common, .Enabled, .Visible, .Text, ....

Does this approach match what you are trying to achieve with these common controls?

Attached is the helpfile for WizTools.

Specifically, WizUtilities.WizUiHelper Namespace describes each control and associated methods and properties.

Additionally, not sure if you want to suggest comments in the coding standard, if so, SandCastle can be used to easily create helpfiles like the one attached.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#32
2008-12-23, 04:49 PM
JavaWiz Wrote:The approach for the WizTools UI elements was to introduce common and well known UI elements to gbpvr development. These elements include: Label, Textbox, List, Button, ButtonList, with methods and properties that are also common, .Enabled, .Visible, .Text, ....
yeah all the controls extend GuiElement, but the only property they have that you have listed is "Visible", a popupmenu control doesnt need a Text property, or a list doesnt really need an enabled field. all gbpvr events (keyboard/mouse) etc get passed to each GuiElement, and it bubbles up until one guielement returns true. so you can have a screen, explorer, menu, menubutton, and it will check if menubutton handled the button, then menu then the explorer etc.

JavaWiz Wrote:Additionally, not sure if you want to suggest comments in the coding standard, if so, SandCastle can be used to easily create helpfiles like the one attached.
yeah i want as much comments in the code as possible, i havent yet commented a heck of a lot, still working on getting the basics down. but before any ticket is closed, all the comments should be done. and if its not, reopen the ticket.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#33
2008-12-25, 06:23 AM
reven Wrote:that would be cool, i have a few open tickets to do Smile

just needs to take an ordinary image and make a reflection that fades out.
Committed. I actually separated it into three functions since a couple of the steps may be useful.
  • FadeImage will fade to a specified background color.
  • GetImageReflection will only produce the reflection of your image. I did this because this can help skin developers control whether or not image reflections get used or not.
  • ReflectImage will produce a copy of the original with the reflection.

Customizations:
  • You can specify the height of the reflection as a percentage of the original image.
  • You can specify whether or not to compress the original image in the reflection.
  • You can specify the direction of fade on the FadeImage function.

Issues:
  • Background color must be specified. We may need to coordinate with skin developers on this. I didn't look at the skin files but we may need a simple way to grab a preset background color to match to the skin.
  • Background color cannot be Color.Transparent. The fade doesn't work when it is. I tried redrawing the completed image and adding the transparency but it didn't work too well. Someone with better knowledge of alpha channels may be able to assist with that.

Attached are an original image with various transforms applied. All were using White as a background color and in retrospect, Black would have given a better effect with that image but you will get the idea. The image resizing was done outside of the committed code.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#34
2008-12-25, 08:54 AM
yeah i was hoping for a way to fade out the reflection to a transparent colour. it wont be useful all that much if you need to specify the background colour all the time (since most backgrounds are graphics and not simple colours)
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#35
2008-12-25, 09:18 AM
just had a quick think about the reflection, one way to do it would be
1. flip the image
2. cut the image to the size you want
3. start from the bottom iterate through each line of the image, set the alpha of each pixel to 255 to 0 (0 being the first line).

this might be a little slow, not sure really, might be alright, not a huge complex operation. and it should produce the fade with a true transparent background regardless of the background colour
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#36
2008-12-25, 10:09 AM
It's definitely worth a shot, I'll try it. It might be a couple of days though. Tomorrow starts the rounds with the extended family for me.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#37
2008-12-26, 04:33 AM
I think I may be able to use the ColorMatrix to do this. I'll let you know if it works.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#38
2008-12-26, 08:40 AM
i moved the imagining library into the "UtilityLibrary" (which i forgot to commit Smile, it only had a logical string comparer in it before)
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#39
2008-12-26, 10:17 AM
K. I was able to get the reflection/fade working properly. The only caveat is that the more pixels it has to process, the longer it takes. Something like posters are almost instant but when you get into something like backgrounds, it takes a few seconds. I'm not concerned with this as it will probably be used for smaller images most of the time. I'll look into speeding it up later but right now I'll just finish it (only left->right and top->bottom fades are working) and clean it up so I can commit it. I'll try to have it committed tonight.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#40
2008-12-27, 03:37 AM
whurlston Wrote:K. I was able to get the reflection/fade working properly. The only caveat is that the more pixels it has to process, the longer it takes. Something like posters are almost instant but when you get into something like backgrounds, it takes a few seconds. I'm not concerned with this as it will probably be used for smaller images most of the time. I'll look into speeding it up later but right now I'll just finish it (only left->right and top->bottom fades are working) and clean it up so I can commit it. I'll try to have it committed tonight.

cool, cheers whurlston, ill have a play with it when its committed (want to use it in the "videos" plugin im doing Smile)
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (8): « Previous 1 2 3 4 5 6 … 8 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,857 2014-11-14, 02:05 AM
Last Post: Benoire
  Open Source Mheg+ Graham 0 1,412 2012-11-30, 06:32 PM
Last Post: Graham
  sample video overlay plugin source code? reven 2 2,326 2011-10-03, 12:42 AM
Last Post: reven
  Source code for older versions ? Spark 1 1,727 2011-02-23, 01:19 AM
Last Post: sub
  Capture source names imilne 4 2,568 2010-11-18, 01:49 PM
Last Post: imilne
  Source for plugin similiar to Video Library ishmale423 2 1,845 2009-05-01, 04:49 PM
Last Post: jasonbs10
  Select capture source khaver 3 1,855 2008-12-15, 02:20 AM
Last Post: khaver
  CommunitySkin 4 Open development thread. Fatman_do 110 24,226 2008-12-14, 09:04 PM
Last Post: McBainUK
  vlc as live TV Source theGressier 4 2,731 2008-09-13, 12:35 AM
Last Post: drlava
  What SCM (Source Control Management) system do you use? JavaWiz 3 2,015 2008-08-19, 07:28 PM
Last Post: Manderson

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode