I am currently exploring oxyplot and wanted to edit a single point in my lineseries. (see image)
For example I want to edit the second point. I want it to be twice the size that it normally is or change the colour. Is that possible without enlarging/changing the colour of all the other points?
I found a way arround it. I drew another graph (scatterseries graph) on the selected point.
Related
So, I have some simple figure (circle, ellipse, rectangle of closed polygon) and I need to fill only part of it.
I mean, I have GraphicsPath or similar object (set of points) and now I can simply fill the whole figure with, for example, orange color.
What I need: user enters 25% and I fill only 25% of the figure, starting from some side (top/bottom).
Maybe, it will be nessesary to find some sub-figure or (bad idea, I know) check all the points in on the field and fill them (only those which inside figure) one by one untill their amount will be 1/4 from the area of the figure. But it won't be so fast especially when image is about 5-6000 pixels from one side.
Here's sample what I have now and what I need for 25%. Important: instead of 25% can be any value.
Project: C# .net 3.5 WinForms
UPD:
Basic usecase.
User draws a figure (circle, ellipse, rectangle, polygon)
User enters value from 0 to 100 (percents)
I fill figure from bottom to the top until I filled amount of area (!), which is equal to user's value
I'm open for any ideas even without code.
I have an application with a Microsoft.Maps.MapControl.WPF map, and a few layers added with mapView.Children.Add(layer).
Each of those layers has different types of overlays on it, which are images added with layer.Children.AddChild(image, locationRect).
I want to be able to move, resize and rotate those objects from code (not from xaml which knows nothing about them), but I don't seem to be able to do the first two (rotation being quite simple).
After trial and error and finding some non Microsoft documentation I see that MapLayer.GetPositionRectangle(UIElement) returns the correct location of the object, so it would seem logical that MapLayer.SetPositionRectangle() should set it, but it doesn't and I can't find any examples of anything on the web that programatically moves an object to a new Lat/long.
Is there a way of moving a geographical object on the map, or do I have to either remove it and add it in the right place, or just move it on the canvas in X/Y coords that I have worked out from the lat/long, both of which seem wrong somehow, but this is my first WPF application (normally use forms) and maybe this is the way it is done?
The Windows-universal-samples that exist on Microsoft github page can help you. There is an example of MapControl where you can get some ideas.
This sample demonstrates how to use the universal map control (MapControl) in a UWP app.
MapControl Basics: adjusting the ZoomLevel, Heading, DesiredPtich, and map stype
Adding points of interest on the map: PushPins, images, and shapes
Adding XAML overlays on the map
Showing 3D locations in MapControl
Showing Streetside experience within MapControl
Launching Maps using URI Schemes
Url: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/MapControl
After this example, if there is more question, post here to solve it.
I think, the best way is getting an model for this XAML, where you can update this properties.
What you can do is apply standard transitions to your image through code. you can use the MapLayer.SetPosition to link it to a location on the map. You may want to use an position origin/offset or a margin to align a specific point of the image with the location.
https://msdn.microsoft.com/en-us/library/microsoft.maps.mapcontrol.wpf.maplayer.setposition.aspx
https://msdn.microsoft.com/en-us/library/microsoft.maps.mapcontrol.wpf.maplayer.setpositionorigin.aspx
https://msdn.microsoft.com/en-us/library/microsoft.maps.mapcontrol.wpf.positionorigin.aspx
https://msdn.microsoft.com/en-us/library/microsoft.maps.mapcontrol.wpf.maplayer.setpositionoffset.aspx
Well this is my question, I have a ZedGraph, now I want to put some points in the ZedGraph, I have my simple class Point wich it have, the X & Y values, fist I check this question, but not answered, at the moment don't work, anyone know how to put just a simple point, my goal is drawing shapes like this one Secciones but I dont know how make this
I believe ZedGraph is the wrong tool for what you want to achieve. You should be using GDI+ drawing do draw your points, lines, rectangles and other shapes. It forms part of C#.NET.
I want to achieve the results as shown in this image
Scale the selected area and embed some object. Please let me know which technique is best.
Cheers
Edit
Comments up!
Q1:Are you trying to modify ONE image, or several?
Several.
Q2:What image libraries do you intend to use?
It is my question, which i should use.
Q3:Do you want a completely automated process, or a semi-manual is OK?
I shall mark the area on face to scale and then select the object of my choice from a list, one image at a time.
Q4:What parameters do you want to specify?
Dimensions of selected area of the face and the object to insert (like orange in this example) –
Q5:Are you aware of face recognition algorithms?
I believe i don't need recognition algorithms because i am selecting the area on face manually. All I need to modify the selected area as shown in the sample image. –
I guess the obvious answer of use Adobe Photoshop is out of the question?
I am trying to write a simple program that lets me overlay a dot on top of an image when the image is clicked. I can save the X and Y data back to my database but then I will want to be able to call that information back at a later date and overlay the dots again via code unlike the first time when the user had to click the image.
I got as far as capturing the X and Y of the click no problem but I am having trouble finding examples specifically for what I am trying to do. All of the examples online seem to be for saving the image with the added graphic but I do not need to do that as it will be the same image every time.
Once I can do this, I also need to work out a way that I can detect what area of the image has been clicked. The areas I need to mark out vary in shape and size so I need to try and work out a way to 'map' these areas and then cross reference with the co-ordinates of the users click (I assume that I may need to do some clever geometry stuff for that?)
If anyone has any suggestions of what subjects/classes/methods etc. to research for either of my queries, I would very grateful.
Thanks in advance
You can use the System.Drawing namespace to achieve this.
Create a control and override OnPaint and OnPaintBackground. Store your clicks in a List
In OnPaintBackground, draw the image using DrawImageUnscaled using the graphics object which is passed to you as a parameter.
In OnPaint, loop through your points array and call graphics.FillElipse or similar to draw a little dot.
Because this isnt a retained mode graphics system, you need to keep drawing these items so this may not suit a large number of dots. In that case, you can create an in memory bitmap and get a graphics drawing object using graphics.FromImage.