I am very curious, I have for example a app to localize our property, our first, second house, favorite park and we can add pushpins to corners of this property in a way to form a shape(triangle, square, polygon etc), not a line or point.
How to create this shape, there is a method to calculate the surface area? Change a background for example to color yellow between these pushpins ?
When we created a shape we can chose from the listbox or map to delete this shape or go to there using GPS, i wrote something like that in Simulate my current position
I think its a interesting app but i need your help ;)
Try getting the geocoordinates of each pushpin and using maths? I guess you could assume the flatness of the Earth over a small area (like a house) but over larger you'll need to account for curvature.
As for colouring the shapes in, I don't think there's a way to do this using the Map control.
Related
I'm using the sketch editor to let the user draw and edit polygons on map
I want to let the user the option to move/rotate/resize etc.
when I create polyline/polygone I can do it with no problem as I send the geometry to the sketch editor
but when I want to create a point, I cannot resize and rotate it, only move the point along the map
(because sometimes my point are represented with a symbol, for example, truck)
is such option even exist?
P.S
I know I can go directly to the geometry / SimpleMarkSymbol and change it properties, but that's not an optimal solution for me
Just wondering - is there a way to add custom shape recognition to UWP ink analyzer?
I need to be able to recognize a semi-circle, an arrow an couple of other simple shapes.
What is the best approach to solve this issue?
As far as I known, we can not recognize a semi-circle, an arrow an couple of other simple shapes by the InkAnalyzer class. It can recognize the specified shape in the InkAnalysisDrawingKind.
The InkAnalysisDrawingKind enum lists Circle, Diamond, Drawing, Ellipse,
EquilateralTriangle, Hexagon, IsoscelesTriangle, Parallelogram, Pentagon, Quadrilateral, Rectangle, RightTriangle, Square, Trapezoid and Triangle. We can not add our custom shape to it.
If you draw a semi-circle, it maybe will recognize to Ellipse or Rectangle that we can not know it is a semi-circle. If you draw an arrow, it will not be recognized as one of the shapes listed. Then it will return InkAnalysisDrawingKind.Drawing.
https://github.com/Microsoft/MTC_WindowsSmartInk
You can do it if you use it in conjunction with Azure's Custom Vision service. I've seen a lot of demo videos from Build about it.
im writing application similar to MS Paint, I've got pencil, shapes and line functionality alredy. I'm adding System.Windows.Shapes.Shape objects (like Rectange, Ellipse etc.) to Canvas and everything works fine. Now im wondering how to create "bucket" functionality like in MS Paint (filling area of same color), is it possibile to do such thing in my app or i need to refactor it?
I think there are diffrent ways of implementing this depending on your skill and time.
If i would do it, i would link the pixels that are same color and at the same place by
http://en.wikipedia.org/wiki/Connected-component_labeling this method. And then color them.
or this:
http://en.wikipedia.org/wiki/Flood_fill
Hej
Lets say I have a cirkel as my usercontrol in a Windows Phone 8 application, And I add elements inside a Geometry group, with a rectangel and a line. I would get the following:
(source: c-sharpcorner.com)
I am interested in having my cirkel as the main element. To specify I want the everything else to only be displayed in the region of the cirkel.
So if the rectangle was red I would only get the red corner displayed.
I have code that can manage inserting and moving objects. But I do not know how to make the intersect work opporsit of the picture.
I have tried a bit of the same in a small sample as is done in this link:
the link is http://www.c-sharpcorner.com/uploadfile/mahesh/path-in-wpf/
Anybody has an idea for this?
Best
So the Best solution I found is to convert your element to WriteableBitmap, and then setting this as the background of your wished shape.
So to acheive the above if you have the elements as geometric shapes you can use this link to get the path of the object.
http://www.c-sharpcorner.com/uploadfile/mahesh/path-in-wpf/
Say, I have some images drawn on screen, like in any average XNA project. Is it possible to make it so that only a selected array of triangles of the image is visible? Here's an example:
The red lines outline the triangles in the array. The blackness is completely hidden from view.
I tried googling and didn't find anything, so I hope this is even possible.
If you want to make a mask like that, you could have a sprite that's the exact shape of the blackness (bonus if you make that shape dynamic ;)). Have it drawn in a layer above whatever you want to hide.
You can use the VertexPositionTexture class.
Then use a mask consiting of a VPT for each triangle in you array to reveal the parts of your texture you want visible.
An example of how you can use it:
enter link description here