Draw on Video Xamarin - c#

Using Xamarin, I am trying to implement the feature that allows a user to draw on top of a video. Note that the drawing doesn't need to be saved.
I would like some input on what the best way of implementing this. My initial though would be to create a drawable custom view that when the user clicks the draw icon, the current frame of the video is passed to that drawable view.
This seems like a pretty great plugin, which I could use to create a custom view https://github.com/martijn00/XamarinMediaManager.
Would really appreciate any help or suggestions :)

Related

Drawing custom Editor controls in Unity

Sometimes a Unity project has data that demands more than ordinary inspector fields and we want to create more sophisticated tools to edit the data. For example, here's a blog post about creating a node editor: Creating a Node Based Editor in Unity
It's useful to be able to create node editors, but that project draws nothing but boxes and lines and curves using the tools in GUI and Handles, which is fine for what it is, but what if we need to draw something not supplied by Handles?
For example, if we want to draw an elaborate mesh to represent some data that we want to be able to edit, it seems not ideal to render each individual polygon of the mesh using Handles.DrawAAConvexPolygon(...). Shouldn't we instead have a way to more directly send the mesh to be rendered? Or is DrawAAConvexPolygon exactly what we should be doing?
Is the GL class the appropriate approach when wanting to draw arbitrary meshes in an editor control? It is certainly capable of drawing, but is it bad practice? In particular, the GL.Viewport(Rect) method seems to work very strangely within a GUI. One cannot simply give it a GUI Rect and thereby have a viewport in the same place we'd have a GUI control if we gave it that same Rect. We need to calculate the Rect that will put the viewport in the appropriate place, and even then we have to determine the coordinate system within the viewport. Based on the documentation for Viewport(Rect) one might expect the viewport to be (0, 0) to (Screen.width, Screen.height), but it does not always work out that way exactly, and it all gives the impression that GL is not designed to be used within Editor GUI. The documentation for GL.Viewport has it used in an OnPostRender method, so is it misguided to try to use GL in other places?
If we should not be using the GL class, then what is the technique for drawing within custom Editor controls?
You may wanna look at Unity Graph view if you want to make a Node Based Editor in Unity.
It use UXML and USS with is close to HTML and CSS.
Making it pretty easy to customise as you wanted.
Unity Video on UXML and USS: Customize the Unity Editor with UIElements!
https://www.youtube.com/watch?v=CZ39btQ0XlE&t=98s
Here are 3 Github you can download and look at.
https://github.com/rygo6/GTLogicGraph
https://github.com/rygo6/GraphViewExample
This one is made by me.
https://github.com/KasperGameDev/Dialogue-Editor-Tutorial/tree/Dialogue-Prototype-Bonus

How can we achieve Skeleton Joint Mapping feature in Xamarin Forms

In web, ImageMapster (jQuery Plugin) allows us to activate HTML complex image maps like Skeleton Joints Mapping
How can we achieve this functionality in Xamarin Forms ?
Please check the demo link.
Skeleton Joint Mapping Demo Using ImageMapster
You can use box views or geometry to display and hide from the layout when the user selects that part of the body. Since you already have the code of the HTML, you could figure out the dimensions of the image that is rendered and use that scale to figure out exactly where to place the red box.
Looks pretty cool btw

Create an Object Editor in C# for WinForms

I need to find, or create an editor that will handle text and images as objects. For instance I have a 3 line string of text, to be able to move it around and position it within a canvas, also the ability to add an image, and possibly resize it within that canvas. and take the result, and save it, whether I get the the offsets and positions manually, of each of the objects (preferable) , or get the entire canvas as an image, to be able to save and print.
Rulers would be great... Im not trying to re-create Photoshop, but the idea is similar.
I will be doing this in a C# WinForms application, it does seem however that a WPF solution might be better suited, and I think I can have a WPF control within winforms...
Any direction or advice would be greatly appreciated.
Forget winforms. It doesn't support anything. Your best bet is to do it in WPF and if you need, you can integrate it into an existing winforms application via the ElementHost.
Please see my similar answers/samples about this:
https://stackoverflow.com/a/15580293/643085
https://stackoverflow.com/a/15469477/643085
https://stackoverflow.com/a/15821573/643085
Also, see this example with support for zoom, panning and resizing functionality:
https://stackoverflow.com/a/16947081/643085
They're all MVVM based and have some interesting features.
You can easily customize these samples and add ANY type of elements:
images,
geometries,
usable interactive UI elements with functionality (TextBoxes, ComboBoxes, whatever),
text,
videos,
FlowDocuments,
or whatever that's visible on screen)
by adding additional data items and their corresponding DataTemplates.

how to create custom labels in c#

I've given a task to create a picture puzzle using c#. I have to customize a control to act like a tile. what I have in my mind is to create label to act as a puzzle tile. I have no experience in customizing a label control.. If any one can help me with a tutorial for this task It would be a great help.
I'm using windows forms for this project and not WPF.
I've googled but couldn't find any suitable tutorial. Please help me on this.
Thank you.
below is how each piece should look like in the application! A tile class is used to represent each puzzle piece.
The only way to manipulate the design structure of Windows Form controls is through the GDI (Graphics Device Interface). The device context is accessed through System.Drawing. This will allow you to inherit or override a control and create/alter its appearance. I worked with the GDI for about a month. It is not something that's learned overnight. As a quick alternative, you may consider adding puzzle pictures to a button control and coding it up so that if button A is within xx pixels of button B's left edge then A&B background image = a connected picture. Or something along those lines.
http://www.codeproject.com/Articles/6913/Creating-a-professional-looking-GDI-drawn-custom-c

Image gallery swipe UI in MonoTouch

I am looking to create a UI experience almost identical to swiping through images in the Camera Roll on the iPhone. I have 5 images that I simply want to be able to swipe through. This view will be the first view of a Tab Bar Controller that I have in place. This is my first iPhone (iOS) app attempt so if anyone feels this question needs to be broken down into smaller chunks, please let me know.
Here's an example of the paging control for MonoTouch I developed some time ago: https://github.com/escoz/monotouch-controls
Take a look at the PagedViewController. That code is actually used in my app, Quicklytics.
Use Pagecontroller.
In this example they have add label, instead of that you add your imageView.
EDIT:
For Monotouch.
The Photos module of Nimbus is exactly what you are looking for.
http://docs.nimbuskit.info/NimbusPhotos.html
The MonoTouch bindings can be found here.
https://github.com/theonlylawislove/MonoTouch.Nimbus

Categories