I have a picture that I need to resize to a specific dimension and then move one of the corner to a place higher than before so the image is not rectangular anymore but some kind of polygon. Is there a library that could help me with this kind of image manipulation or does someone knows the name of this operation?
This is for a .NET application and there is an option for a six-points area also.
Have a look at here
Anti-Grain Geometry is an interesting graphical library. There is also a .NET wrapper called CreativeDocs.NET.
I don't know if it can help for certain but you might want to look at CxImage:
http://www.xdp.it/cximage.htm
Related
The section box is currently not able to be rotated natively (as I see it at least). Because very few models/objects are actually placed perpendicular to X/Y I have been trying to look into a method for doing this.
Does anyone know of a method for doing this?
Anyone know if this is something that are being considered implemented in the near future?
It would be nice to include the rotation gizmo from the normal section plane, or have the box natively be added to follow the orientation of the face selected when creating it through the viewer UI.
Thank you in advance
Rotating the section box is not possible today, and as far as I know there are no plans for that, either.
Depending on what your exact use case is, you could potentially achieve what you need by rotating the model (using model.setPlacementTransform(xform)) and not the section box.
I want to create a help screen for my game. This screen contains text and pictures that describe the game.
One option is to create a stage and add a table to it that will define the position of the different labels and images. However, this option seems to be "unnatural", limited when it comes to format options, and a potential headache when it comes to code maintenance.
The content of the screen is static which makes it a good candidate for an HTML document. My idea is to create the help screen document in HTML and then have it rendered inside my help screen. My question is, is this possible in libgdx? If not, what other way would I have to implement this?
As it is not possible to embed a browser in your LibGDX app (as nicely explained here), you could either link to an external website in the device's browser or use the libgdx-stagebuilder to build up the Scene2D stage using XML. Or you just stick to the normal LibGDX way. Unfortunately, I don't see any other option than those.
I don't think this is supported in libGDX as of yet, but it should be possible using platform specific code. How you do it will vary from platform to platform, so I can't tell you exactly what to look up, but android has something called webview you might want to look at.
The title says it all, I don't know how to code a code that creates a circle, expanding it is no problem, I need help knowing what to code in order for it to be created. Please help :)
Look at the graphics routines in the display class:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html
it has examples too.
I'd like to know if anybody knows of a good and preferably quick technique for auto cropping images (i.e. BitmapDatas), similar to how GIMP does it? This basically means cropping an image to remove as much unnecessary background as possible, so that all you have left is a rectangle which contains the actual image.
Have a look at BitmapData's getColorBoundsRect() method which does that for you if you pass the correct arguments.
Also have a look at PlasticSturgeon's excellent article explaining to use the function.
As a front-end developer, I've been given a mock-up design to implement. This design features several tachograph-style icons, which have me stumped as to the best way to mark them up in HTML and CSS.
The images look like the following:
Obviously these assets represent the empty state and the full state respectively.
My issue is this: how can I mark-up these images so that I can show varying levels of completion, i.e. 10% full, 60% full etc?
Waiting in anticipation to hear your answers.
I would seriously recommend looking into the Raphael javascript library. You can knock something like this up in just a few lines of code.
See also this question: Drawing a half gauge/speedometer (JavaScript Canvas or Java Swing Example needed) where I gave an answer including a four-line code sample using Raphael, which provides an animated fuel gauge. You'll need to tweak it for your design, but even then it's only going to be a few lines of code.
The great thing about using Raphael to draw things like this is that it is fully compatible with older browsers, even IE (as far back as IE6 if you need it), without you having to do any special code to support it. It's a great little library.
Hope that helps.
Given that the image reprisents actual data and isn't purely a design mechanism, I'd mark the image up as an HTML image.
<img ... alt="10%">
If your concern is about showing portions of the image, one way you could do this would be to set the image as a background to some container and use width and height to identify the amount of the image to show.
i'm not an expert on html5 /css3, but would you not use the html5 arc command to create a mask to reveal the full state.
As you have a 270 degree rotation from empty to full, you'd just map the value as percentage of 270 to create the value of the arc that would mask the appropriate value.
I believe that there is a java script Math.PI that might help to.