home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My Films
feature req: fake cover with title name
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Inker" data-source="post: 249087" data-attributes="member: 10541"><p>Quite simple really, just draw an image in code, and give that to mp as the texture (you might have to adept it a bit to wrap text etc).</p><p></p><p>From TV-Series code:</p><p>[CODE]/// <summary></p><p> /// Create a banner image of the specified size, outputting the input text on it</p><p> /// </summary></p><p> /// <param name="sizeImage">Size of the image to be generated</param></p><p> /// <param name="label">Text to be output on the image</param></p><p> /// <returns>a bitmap object</returns></p><p> private static Bitmap drawSimpleBanner(Size sizeImage, string label)</p><p> {</p><p> Bitmap image = new Bitmap(sizeImage.Width, sizeImage.Height);</p><p> Graphics gph = Graphics.FromImage(image);</p><p> //gph.FillRectangle(new SolidBrush(Color.FromArgb(50, Color.White)), new Rectangle(0, 0, sizeImage.Width, sizeImage.Height));</p><p> GUIFont fontList = GUIFontManager.GetFont(s_sFontName);</p><p> Font font = new Font(fontList.FontName, 36);</p><p> gph.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;</p><p> gph.DrawString(label, font, new SolidBrush(Color.FromArgb(200, Color.White)), 5, (sizeImage.Height - font.GetHeight()) / 2);</p><p> gph.Dispose();</p><p> return image;</p><p> }[/CODE]</p><p></p><p>Maybe this helps you.</p><p></p><p>Inker</p></blockquote><p></p>
[QUOTE="Inker, post: 249087, member: 10541"] Quite simple really, just draw an image in code, and give that to mp as the texture (you might have to adept it a bit to wrap text etc). From TV-Series code: [CODE]/// <summary> /// Create a banner image of the specified size, outputting the input text on it /// </summary> /// <param name="sizeImage">Size of the image to be generated</param> /// <param name="label">Text to be output on the image</param> /// <returns>a bitmap object</returns> private static Bitmap drawSimpleBanner(Size sizeImage, string label) { Bitmap image = new Bitmap(sizeImage.Width, sizeImage.Height); Graphics gph = Graphics.FromImage(image); //gph.FillRectangle(new SolidBrush(Color.FromArgb(50, Color.White)), new Rectangle(0, 0, sizeImage.Width, sizeImage.Height)); GUIFont fontList = GUIFontManager.GetFont(s_sFontName); Font font = new Font(fontList.FontName, 36); gph.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; gph.DrawString(label, font, new SolidBrush(Color.FromArgb(200, Color.White)), 5, (sizeImage.Height - font.GetHeight()) / 2); gph.Dispose(); return image; }[/CODE] Maybe this helps you. Inker [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My Films
feature req: fake cover with title name
Contact us
RSS
Top
Bottom