How to change font and size of subtitles in libvlc sharp 3.4.0? - libvlc

Seems i'm not getting the right way to code this.
I can do almost everything done to my media player be functional except for this.

This is a bit tricky, and not exposed by the LibVLC public API, which is why you can't find a C# function for this. But there is a way.
First, read how to use LibVLC options
Then find the one you want from the Wiki.
These look like what you're looking for
--freetype-rel-fontsize=<int> Size
--freetype-bold
--freetype-color=<int> color
Use it like this
var libvlc = new LibVLC("--freetype-bold", "--freetype-rel-fontsize=10", "--freetype-color=65280");
And you would get green, bold, extra large subtitles.
For looking up usage and parameter info, you can also check out how the VLC apps use it. Here is VLC for Android libvlc options usage.

Related

Godot HTML5 graphics not rendering correctly

I am having some issues with the HTML5. The version I am using of Godot is 3.2.3.
It should look like this:
[1]: https://i.stack.imgur.com/f8HPE.jpg [How the game should look, in all its glory :p]
But when I open it on my local server, it looks like this:
[2]: https://i.stack.imgur.com/aZT2l.jpg [How the game looks, in all its glitchness :p]
What could be causing this?
It is also skipping the login scene when I run it on browsers. The exe version runs a-okay.
GLES2 Is the recommended graphics driver for HTML5 games with Godot! Hope this helps! More About the differences between the two graphics drivers can be found: here
Have a great day!
I know this is an old post, but the problem with that seems to be that there is some screen space post process filter enabled like SSAO.
GLES3 is better on some sides but comes with a few issues for HTML

Generate/use images similar to those on Github's Explore Showcases

I noticed some nice images on Github's Explore Showcases:
I would like to use something similar on my own application. Is there a library that randomly generates such images? I see they use SVG, but not sure how I can use or even create something similar.
As I commented before, the last picture can be generated by a number of background generators like:
Trianglify,
Triangulation/,
I love triangle,
DMesh,
image-triangulator,
delaunay-triangulations/.
All are capable to export the resulting picture as SVG.
And then you have javascript libraries:
snapsvg.io,
seenjs.io.

Images do not show up when I run my app on iOS device

I have images titled like so in my app:
image~iPhone.png
image#2x~iPhone.png
In interface builder I am loading image.png into my UIImageView. I also programatically load some images into a different view using imageWithContentsOfFile. The images all load fine when I run in the simulator but I get no images when I run on the device. If I use the full name of the image in interface builder it works but I want iOS to distinguish between high res and lower res. I have tried a lot of different things but can't figure this out. I see this error in the debugger as well:
Could not load the "image.png" image referenced from a nib in the bundle with identifier "com.mycompany.myproject"
Xcode 4
Deployment Target 4.1
Base SDK 4.3
Thanks for any help.
Ok...so after much experimenting I got it working.
I had two images named:
image#2x~iPhone.png
image~iPhone.png
and I was trying to load them using IB or imageWithContentsOfFile using
image.png
This worked fine in the simulator but not on my device. I just got a blank white screen where the image should be.
I finally renamed the high resolution image to:
image~iPhone#2x.png
Moving the '#2x' modifier after the device modifier(~iPhone) when referencing my images allowed it to work the way I understood that it should from reading Apple's docs. I was under the impression that you didn't need to include the device modifier when referencing images but I had to.
To sum up, I am now using
- image~iPhone.png
to reference my images in IB and programatically for some images. I now get iOS recognizing that I am on a retina screen and loading the #2x images accordingly. So the #2x modifier had to go at the end and the ~iPhone modifier had to be included in the name of the '.png'.
That is what worked for me. Hope it helps someone else. Note that I am only building my app for iOS4.1 and above so there might be some issues with this if you are supporting previous version.
iOS does not automatically pick the right image for the device like that. You are going to have to write code to check which device it is, and set the image by full name.
e.g. if ([[UIScreen mainScreen] scale] == 2) // set hi res image
Or, you can just use the same image in both, and set the content mode to scale to fill. It will look the same.
EDIT: Try writing either ~iphone (lowercase), or just don't write ~iPhone at all on the file name. If your app is not universal, then writing the ~iphone suffix is completely pointless.
iOS file system is case sensitive and device modifiers should be lowercase, it should be
image~iphone.png
image#2x~iphone.png
The #2x comes before the device modifier.
See the resource programming guide

How to set Legend with Open Flash Chart 2 graphic using Open source Java API - JOFC?

I have a Seam 2.2 app running under JBoss5.1. In this application I have successfully developed some Graphics using Java Open Flash Chart, which is a Java API for Open Flash Chart.
Now I would like to add a X and Y legend like this one.
Well I have a graphic which is rendering properly and than I try to set X Label using:
...
chart.setXLegend(new Text("Legenda X"));
But than instead of showing the legend it corrupts something which causes the graphic to renders completely blank.
This is the generated JSon when the graphics renders correctly.
{"y_axis":{"min":388,"max":866,"steps":20},"title":{"text":"Gráfico de gasto mensal com Combustível"},"bg_colour":"#FFFFFF","is_decimal_separator_comma":0,"elements":[{"values":[{"tip":"R$:610.0\n05/2010","top":610},{"tip":"R$:488.0\n06/2010","top":488},{"tip":"R$:634.57\n07/2010","top":634.57},{"tip":"R$:766.0\n08/2010","top":766},{"tip":"R$:396.0\n09/2010","top":396},{"tip":"R$:610.0\n10/2010","top":610}],"type":"bar"}],"num_decimals":2,"is_fixed_num_decimals_forced":0,"x_axis":{"labels":{"labels":["05/2010","06/2010","07/2010","08/2010","09/2010","10/2010"]}},"is_thousand_separator_disabled":0}
I took a deeply look at it and turns out that whenever I try to add the x legend with the code fragment showed above the JSon is actually NOT generated by JOFC.
I could not find much useful documentation on JOFC on the web and the API itself is not very well documented, so I am completely lost on trying to add this simple x label, which should be the easiest part :( . Any Ideas on that.
An update:
Now I just have downloaded JOFC source code and will take a look at this.
It looks like there's an open issue on the JOFC page: http://code.google.com/p/jofc2/issues/detail?id=29
It suggests a workaround of calling the function like:
chart.setXLegend(new Text("Legenda X", Text.TEXT_ALIGN_CENTER))
I would try with Open Flash Grapix, it is easier to use, and just sets parameters on FlashVars.
Open Flash Grapix

Displaying Maya Mesh XML in browser

I have a Mesh file (XML format) created in Maya.
I would like to display it in the browser with some additional options for the user, like rotating an zooming in and out.
What should be the best and easy method to do so?
(SilverLight, HTML5/JS/Canvas, Flesh)
I would really like to try HTML5/Canvas - is there any libraries that know how to do it?
Thanks.
I would really like to try
HTML5/Canvas - is there any libraries
that know how to do it?
You can visit this site learningwebgl
There are a lot of lessons and demos. On the right side there is a list of frameworks.
But you need browser support for webgl...
If you are willing to export your file in Collada/DAE format (which is basically XML), there are some online WebGL framework demos that show that a DAE file can be displayed the way you wish.
The frameworks that I've seen this for are GLGE and SpiderGL.
(WebGL is the 3D version of HTML5/Canvas.)
you can export your maya scene with http://www.inka3d.com and then manipulate it with javascript

Resources