NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Wishlist v
« Previous 1 … 126 127 128 129 130 … 193 Next »
add "border" to textstyles

 
  • 0 Vote(s) - 0 Average
add "border" to textstyles
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#1
2005-12-24, 07:38 AM
it would make life easier if textstyles had a "border" attribute, thus allowing you to draw a border around any string that uses compositeimages, currently im doing this whereever possible
Code:
            <DrawText text="@Song" loc="-2,20" size="360,24" textStyle="MusicSong2" align="Right"/>
            <DrawText text="@Song" loc="2,20" size="360,24" textStyle="MusicSong2" align="Right"/>
            <DrawText text="@Song" loc="0,22" size="360,24" textStyle="MusicSong2" align="Right"/>
            <DrawText text="@Song" loc="0,24" size="360,24" textStyle="MusicSong2" align="Right"/>
            <DrawText text="@Song" loc="-2,20" size="360,24" textStyle="MusicSong2" align="Right"/>
            <DrawText text="@Song" loc="-2,24" size="360,24" textStyle="MusicSong2" align="Right"/>
            <DrawText text="@Song" loc="2,20" size="360,24" textStyle="MusicSong2" align="Right"/>
            <DrawText text="@Song" loc="2,24" size="360,24" textStyle="MusicSong2" align="Right"/>
            <DrawText text="@Song" loc="0,22" size="360,24" textStyle="MusicSong" align="Right"/>
ie drawing the image +-2 pixels in every direction, which does the border effect but doesnt work every where (time in the tv guide for example).

and moving things is a pain (have to change 8 lines...)
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,712
Threads: 767
Joined: Nov 2003
#2
2005-12-24, 04:13 PM
Have you tried the existing <DrawTextWithOutline>? You can see it in use in the OSD\skin.xml

<DrawTextWithOutline text="@subtitle1" loc="0,380" size="720,50" fillColor="White" borderColor="Black" outlineWidth="2" textStyle="@subtitleStyle1" align="Center"/>
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#3
2005-12-24, 11:00 PM
no i never new that existed, this will make life easier, but for something things like the time in the tv guide, this wont work. since its a special element which just says where to position the time, and not part of a composite image.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#4
2005-12-25, 12:36 AM
i found a small problem, the using
Code:
<DrawTextWithOutline text="@Artist" loc="0,2" size="360,24" fillColor="White" borderColor="Black" outlineWidth="2" textStyle="MusicArtist" align="Right"/>
it draws the border on the inside.

ive attached 2 screenshots, the first one (well i hope first one, the one that looks crap) is useing "DrawTextWithOutline" and the second one is done using
Code:
            <DrawText text="@Artist" loc="-2,2" size="360,24" textStyle="MusicArtist2" align="Right"/>
            <DrawText text="@Artist" loc="2,2" size="360,24" textStyle="MusicArtist2" align="Right"/>
            <DrawText text="@Artist" loc="0,0" size="360,24" textStyle="MusicArtist2" align="Right"/>
            <DrawText text="@Artist" loc="0,4" size="360,24" textStyle="MusicArtist2" align="Right"/>
            <DrawText text="@Artist" loc="-2,0" size="360,24" textStyle="MusicArtist2" align="Right"/>
            <DrawText text="@Artist" loc="-2,4" size="360,24" textStyle="MusicArtist2" align="Right"/>
            <DrawText text="@Artist" loc="2,0" size="360,24" textStyle="MusicArtist2" align="Right"/>
            <DrawText text="@Artist" loc="2,4" size="360,24" textStyle="MusicArtist2" align="Right"/>
            <DrawText text="@Artist" loc="0,2" size="360,24" textStyle="MusicArtist" align="Right"/>

is there anyway to make the default "DrawTextWithOutline" (or perhaps a different attribute so wont screw up any existing use of that attribute) to draw it similar to the 2nd screenshot? (ie on the outside of the text)
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,712
Threads: 767
Joined: Nov 2003
#5
2005-12-25, 04:03 PM
I actually use it to generate text somewhat like your second screenshot for the SRT subtitles OSD display. I use it with a bold font, are you?
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#6
2005-12-25, 10:37 PM
every line but the top line was bold, heres the complete skin file
Code:
<settings>
    <!-- The version number of the Music Panel we are using -->
    <Version>2.0.0.0</Version>
    <!-- text style -->
    <TextStyles>        
        <TextStyle name="MusicSong" color="White" typeFace="Arial Black" size="14" style="plain"/>    
        <TextStyle name="MusicAlbum" color="White" typeFace="Arial" size="14" style="bold"/>    
        <TextStyle name="MusicArtist" color="White" typeFace="Arial" size="15" style="bold"/>    
        <TextStyle name="MusicPosition" color="White" typeFace="Arial" size="14" style="bold"/>    
    </TextStyles>
    <!-- Composite Images -->    
    <CompositeImages>
        <CompositeImage name="MusicPanel-Play" size="530,90">
            <DrawImage filename="..\gradient.png" loc="0,0" size="530,90"/>
            <DrawImage filename="@AlbumArt" loc="364,0" size="90,90"/>
            <DrawImage filename="..\My Series\music_play.png" loc="246,66" size="24,24"/>    
            <DrawTextWithOutline text="@Artist" loc="0,2" size="360,24" fillColor="White" borderColor="Black" outlineWidth="2" textStyle="MusicArtist" align="Right"/>
                        
            <DrawTextWithOutline text="@Song" loc="0,22" size="360,24" fillColor="White" borderColor="Black" outlineWidth="2" textStyle="MusicSong" align="Right"/>
            
            <DrawTextWithOutline text="@Album" loc="0,46" size="360,24" fillColor="White" borderColor="Black" outlineWidth="2" textStyle="MusicAlbum" align="Right"/>
                            
            <DrawTextWithOutline text="@PositionDuration" loc="0,68" size="360,24" fillColor="White" borderColor="Black" outlineWidth="2" textStyle="MusicPosition" align="Right"/>
        </CompositeImage>
        <CompositeImage name="MusicPanel-Pause" size="530,90">
            <DrawImage filename="..\gradient.png" loc="0,0" size="530,90"/>
            <DrawImage filename="@AlbumArt" loc="364,0" size="90,90"/>
            <DrawImage filename="..\My Series\music_pause.png" loc="246,65" size="24,24"/>
            <DrawTextWithOutline text="@Artist" loc="0,2" size="360,24" fillColor="White" borderColor="Black" outlineWidth="2" textStyle="MusicArtist" align="Right"/>
                        
            <DrawTextWithOutline text="@Song" loc="0,22" size="360,24" fillColor="White" borderColor="Black" outlineWidth="2" textStyle="MusicSong" align="Right"/>
            
            <DrawTextWithOutline text="@Album" loc="0,46" size="360,24" fillColor="White" borderColor="Black" outlineWidth="2" textStyle="MusicAlbum" align="Right"/>
                            
            <DrawTextWithOutline text="@PositionDuration" loc="0,68" size="360,24" fillColor="White" borderColor="Black" outlineWidth="2" textStyle="MusicPosition" align="Right"/>
        </CompositeImage>
        
        <!-- Used when there is no album art image found, just place the default album image in the same dir as this musicpanel.xml file-->
        <CompositeImage name="DefaultAlbumArt" size="90,90">
            <DrawImage filename="..\My Series\music.png" loc="0,0" size="90,90" />
        </CompositeImage>
    </CompositeImages>        
</settings>
LilY0da
Offline

Senior Member

Posts: 442
Threads: 25
Joined: Jul 2005
#7
2005-12-28, 05:35 PM
That's cause you have a life and don't spend your days on forums, unlike me Big Grin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,712
Threads: 767
Joined: Nov 2003
#8
2006-01-02, 06:39 PM
Reven, just thought I'd let you know I've improved the visual appearance of this <DrawTextWithOutline> for the next release.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#9
2006-01-03, 03:37 AM
cool, is this available for the "time" in the tv guide? thats where i really need it (white text over a picture, you cant read half of it).
Old Dog
Offline

Posting Freak

Posts: 1,083
Threads: 99
Joined: Jul 2005
#10
2006-01-03, 03:52 AM
sub Wrote:Reven, just thought I'd let you know I've improved the visual appearance of this <DrawTextWithOutline> for the next release.

My thanks too.
Learning new tricks!
Visit Plain Jane's Collection
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


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

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

Linear Mode
Threaded Mode