Draw Line on Firebreath Plugin - firebreath

I want to draw line on Firebreath Plugin. While searching I have came acrossed this Link where FB::Rect is used to display text. I also tried for FB::Line but not available. Should I use D2D1 with Firebreath?
Please let me know for the same.

You have not sufficiently read the code to understand what is going on. FB::Rect is just a structure containing dimentions. Drawing in FireBreath is just using the appropriate platform APIs to draw. On windows that means GDI. Learn to draw a line using GDI and you'll be able to draw with FireBreath on windows.

Related

JOGL - Swing - JavaFX

Ok,
I have a working JOGL application. I use a lot of OpenGL features in it including Textures, VBO's, Ray-Picking, etc. I like working with OpenGL directly and don't want to use any other 3D graphics libraries.
What I want to achieve is two fold:
I want to be able to embed this JOGL application in a subset window of a larger UI window. So alongside the JOGL window will be a photo viewer, text box and scrollable list.
I am designing this application to run on Windows 10, multi touch hardware.
What I have found so far:
Java's Swing toolkit is the only way that I have been able to embed a JOGL window. However, Swing is old and dated looking.
Incorporating multi touch into swing can be done but does require a lot of custom gesture detection. This is fine but maybe options exists that don't reinvent the wheel.
JavaFX looks great and i'd like to use it but I don't see any straightforward way of pairing it with JOGL.
Do any of you have suggestions? Has anyone done this before?
You can integrate JOGL into a JavaFX application by using the SwingNode.
https://docs.oracle.com/javase/8/javafx/api/javafx/embed/swing/SwingNode.html
The opposite (integrating some JavaFX into a Swing application) is also possible but I would not reccomend it.
Doing the JOGL integration this way will not be as performant as a native OpenGL window but for many application it will be sufficient.
There's a far better solution right now based on JOGL 2.4 RC NewtCanvasJFX, please have a look at my detailed tutorial.

Emulating Photoshop color levels in AS3

I'm making an app in which I need to make some photo effects similar to Instagram's effects. I was wondering if it's possible to somehow emulate the work of Photoshop's color levels in AS3.
I've tried using AdjustColor, ColorMatrixFilter and ColorTransform classes but desired image is very hard to achieve using those.
So does anyone have a solution easier than that? or maybe someone knows a library that I couldn't find on Google?
You should have a look at Joa's image processing library.
Have a look on this library:
http://peternitsch.net/bitmapdata.js/
This is actually implemented in Javascript, but it's based on the Flash API. All You need is there. Or i can recommend Foundation ActionScript 3.0 Image Effects by Todd Yard.
Flash API reference is another good resource for inspiration.
There is another good resource for pixel manipulation found here: http://evanw.github.com/webgl-filter/. This is done in WebGL but if your target API is still Flash, then you can easily transposed the GLSL language into Pixelbender and inject the shader
into the Flash by making reference to the pbj file.
Check Grant Skinner's TweenMax plugins, especially ColorMatrixFilter.

Depth map (2d+z) algorithm or software

I'm searching for Depth map algorithm for action scrip 3 (or some other language).
My goal is to generate depth map for static image on run time.
I have fount this example http://kode80.com/2009/06/29/papervision-zbuffer-and-dof/, i didn't have the time to investigate it's code but i have the filling its working only with 3d models.
Worst viable option is server side technology that does the work.
Extended description:
I have a task to develop flash application where 3d rotation of a head is simulated by a 2d image uploaded by the user.
There are some japan guys that have managed to do that (http://hairtry.jp/), but the technology that they are using is server side. It generates swf fail with precisely coped eyes and image for the depth map of the uploaded picture. I can't find out what is the sever side technology that they are using so I'm searching for any posible workarounds.
Thanks in advance.
Cheers,
Chavdar Slavov
your easiest solution would be to use a 3d engine, Paper vision seems to be getting out dated, theres a lot of documents on how to use, and tutorials but again not much has been happening with them lately. i suggest Away3d "www.away3d.com" they seem up to date.
for what your asking it is possible to do this 100% in flash but to create a 3d head at runtime and fill the face with hieght maps this is possible, you would need to look at bitmap manipulation.i dont think this is an easy task, what you should learn first is how to add an image to a spheric surface dynamically than look into height mapping by converting certain coulours from the image into different levels of depth i must say im sure this is advanced stuff, i manged to animate a globe that was this same method it looks dodgy but it gives you some source code in the FLA
http://www.ffiles.com/flash/animations/globe_animation_3496.html
The above link will allow you to download my source files, the animation it self is a scrolling image but i used Actionscript to give the globe depth and a sheric look

html5 canvas paint application

I'm working on a paint application with canvas, and trying to make some better tools.
now i have one tool that only connects lines while following the mouse movement.
can you think of a good tutorial or a good idea for other tools like spary, or brush?
thanks
You might find the following resources useful:
Create a Drawing App with HTML5 Canvas and JavaScript
Create a Paint Bucket Tool in HTML5 and JavaScript
Overview of JavaScript Application Development - Case CanvasDraw
Presentation - Intro to HTML5 Canvas
Feel free to contact me if you need more specific pointers. I think those above should at least help you to get started. :)
Please have a look at this code project article.
it may be useful to you.
http://www.codeproject.com/Articles/427422/Paint-Brush-Application-Using-HTML5-Canvas
thanks
I don't have a tutorial, but I think you should simply use thicker lines to create a brush tool.
A spray tool could draw random points in a circle with random alpha(that's quite easy to implement), but that might be extremely slow on some browsers. Drawing using pre-generated images would be much better but harder to implement.

Advice for creating Google Maps-like interface

I'm trying to make some web-based board games, and I want the interface to be pannable and zoomable. Much like how in Google Maps, you can pan and zoom the map, I want the game board to be moved and zoomed. Unlike Google Maps of course, I do not want to work with image tiles.
Can anyone give me recommendations as to what technology to use? Would this be a good fit for plain HTML? HTML 5 Canvas? or SVG? Any particular JS libraries to recommend or something else entirely?
I'd like to avoid flash and Java. And browser compatibility is plus, but not the most important factor. For example, I think it would probably be OK to require Chrome Frame for older IEs.
Any ideas/advice would be appreciated.
A few thoughts:
Use the OpenLayers UI with a "fixed" strategy to load vector graphics for your board all at once. (This is overly heavy-weight, probably, but comes with pan-zoom and IE compatibility.)
Use Raphael to build your board in SVG, using RaphaelZPD for pan-zoom. RaphaelZPD isn't cross-browser (even though Raphael is), so you'd need Chrome Frame for IE compatibility. This would be pretty lightweight, I think.
Use pure SVG for your board, use SVGpan for pan-zoom. Chrome Frame required here too, though you could use SVGweb if you wanted. You could draw your boards right in Inkscape, clean up the SVG's and add whatever ID's you need in the XML (SVG is XML under the hood), and interact with the board with jQuerySVG if you like, or script interaction by hand. Did I mention that CSS works with SVG? I think this is your best bet.
I can't think of an advantage to using Canvas here, unless you had lots of animation or bitmaps. SVG is far more transparent in how it works - it's XML under the hood, and when rendered in a page, becomes DOM nodes you can easily manipulate in modern browsers.
Plain HTML would probably be hard to handle scaling with. I've seen plenty of image scalers, but haven't seen complex HTML structures, and complexity would be compounded by needing to pan at a zoomed level.
If you want total control of your development environment you could create your own web rendering plataform. I think you can use HTML canvas 5 as your interface with the browser.
You can easily implement drag, pan and zoom using HTML canvas. This approach is very similar with game development in many plataforms. Here an example of using HTML canvas 5 for an interface that supports pan, drag, and zoom.
Having the control of your environment you will have a wide range of possibilities.
If you don't mind tiles, I'd suggest checking out Polymaps "A JavaScript library for image- and vector-tiled maps using SVG". It's probably possible to borrow some parts from there for panning and zooming.