Draw arrow in WPF - wpf

I wanted to draw the arrow with element. Is there any way to do that or any tools which autogenerate the path for given shape ?
https://stackoverflow.com/a/30477088/15720206 , I needed arrow which is different than the above post.
reference googled picture:
https://www.google.com/search?q=arrow+head+symbol&safe=active&rlz=1C1GCEB_enIN859IN859&sxsrf=ALeKk0306SSwnBsHVElNz35YJeOstlWwsQ:1629698889584&source=lnms&tbm=isch&sa=X&ved=2ahUKEwj94Z27vcbyAhWO_3MBHUp4CMIQ_AUoAXoECAEQAw&biw=1918&bih=952#imgrc=wv3eg9wV_H09FM

I found the answer: following use of data points will solve:
Data="M 0 10 10 10 10 7.5 15 11 10 14.5 10 12 0 12 Z"

Related

Svg.js Duplicate, Arrays, Merge

I'm new to SVG.js and to a concept in general, though I have a vector graphic background. So what I'm looking for is the understanding of the concept.
Duplicating, have found only the Array copy function, how to duplicate an object?
As an example:
element.rotate(45, 50, 50)
This rotates the element what if I want to keep a copy intact?
The Array itself. What is it? Doesn't looks like an Array in a graphic design program. What if I want simply to have a three raw array with five column of elements?
Merging. If I have an arc and line could I merge them to a path? Then rotate around an endpoint their copy and merge again to have the nice corners?
Maybe I ask too much but as a newcomer, I need some push forward.
The clone() method is your friend if you want to copy shapes.
You can read through the docs at svgjs.com to learn more.
For merging: No, that is not possible with svg.js albeit not impossible in general.
Its just that nobody requested this feature until now or nobody had the time to put their brain capacity into it to solve it.
There is a chance, that it gets considered, when you open a new issue and request that feature.
There is one problem with your idea though
// a line
canvas.line(0, 0, 200, 0)
<line x1="0" y1="0" x2="200", y2="0">
// an arc
canvas.path('M 200 0 A 100 100 0 0 200 200')
<path d="M 200 0 A 100 100 0 0 200 200">
// resulting path
canvas.path('M0 0 200 0 A 100 100 0 0 200 200')
<path d="M0 0 200 0 A 100 100 0 0 200 200">
// rotating the path
canvas.path('M0 0 200 0 A 100 100 0 0 200 200').rotate(90, 200, 200)
<path d="M0 0 200 0 A 100 100 0 0 200 200" transform="matrix(....)">
As you can see, rotating your path does not change the values of the d-attr. Rotation is a transformation which is done with the transform attribut. So you cannot easily merge these 2 paths together. Instead you first have to get rid of the transformation and apply it to every point directly. Then you can merge.
This ofc is again possible but maybe not something someone implemented already.
It would make a cool plugin, though...
Answering my own question if someone one day needed this.
First of all the SVG.js and its kinds do not work with geometry they work with SVG. Learn SVG first than decide whether do you need them or not. In my case, Vue will do work simpler.
As for others:
Duplicating - all that the SVG provides in my case mostly <use>, but be careful with styles they are unchangeable.
Arrays - no such thing not as in a CG graphics editor, you should program them yourself. As I sad SVG.js only help you with SVG not with geometry
Merging - theoretically possible but there is no out of the box solution.

Shortcut for base mode in maya

Is there a base mode in Maya? If yes, then How to go to base mode? What is the shortcut key?
I'm using Maya 2017 student edition. I was following a video on YouTube, where I came across base mode. I don't know how to go to base mode.
I've never heard about any base mode in Maya since 2001. I suppose you're talking about shortcuts for changing a quality display setting for NURBS/Poly in Maya. Or shortcuts for shading. Or object/component mode.
Here are Display Quality shortcuts and their MEL equivalents for Script Editor.
1 – Rough quality display setting
2 – Medium quality display setting
3 – Smooth quality display setting
0 – Default quality display setting
displaySmoothness -divisionsU 0 -divisionsV 0 -pointsWire 4 -pointsShaded 1 -polygonObject 1;
displaySmoothness -divisionsU 1 -divisionsV 1 -pointsWire 8 -pointsShaded 2 -polygonObject 2;
displaySmoothness -divisionsU 3 -divisionsV 3 -pointsWire 16 -pointsShaded 4 -polygonObject 3;
displaySmoothness -polygonObject 0;
Also, there are two shortcuts for wireframe/shaded geometry:
4 – Wireframe Mode
5 – Smooth Shade All Mode
Also, there are five shortcuts for object/component mode. These ones you can use for polygonal object's components:
F8 – Object/Component Switch
F9 – Show Vertices for selection
F10 – Show Edges for selection
F11 – Show Faces for selection
F12 – Show UVs for selection

How to custom display numbers in CakePHP Paginator

I'm trying to change the display of links on a search result page.This is how the links display on my page:
1 2 3 4 5 6 7 8 9 10 | Next10
1 is current page.
After clicked on Next10 link, I want it display like this:
11 12 13 14 15 16 17 18 19 20 | Next10
I 've spend hours on it. But I couldn't find the way to make it work. Is there any solution?
I use
'echo $this->Paginator->link('Next10',array('page' => $this->Paginator->params('page') + 11));'
for the view.
You're going to have to write your own paginator function to display the numbers. What you're after (and what Cake doesn't support) is a different modulus for pages before and after the displayed page. Cake only supports one modulus argument:
http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#creating-page-number-links

How can I paginate like: Prev 4 5 6 7 Next

I have a problem with this paginate in Cakephp. Please show me how to do this!
My problem is:
+ In normal: the page numbers are:
Prev 1 2 3 4 Next
When user press from 1 to 4, the page numbers are not changed.
When user press the Next button, I want the page numbers must be:
Prev 5 6 7 8 Next
But now they are:
Prev 3 4 5 6 Next
How can I move the number 5 leftmost when I press the Next button
I'm using the $this->Paginator->numbers to generate page number, how can I config this?
Please help me, thanks a lot.
You shouldn't "move" the number, but start the nav-paging call at the current page.
It is done by providing options to the numbers() function (first and last to be specific).
check it here: http://api.cakephp.org/class/paginator-helper#method-PaginatorHelpernumbers

SVG/XAML: Defining a path which looks like an arrow

I'm trying to use SVG (really XAML) to define a path which looks like a downwards pointing arrow.
|
|
\ | /
\ | /
\ /
`
It is super-important that the edge of the arrow is sharp. I have tried with various combinations of M, L and z with no success.
You should take a look at the Marker element:
painting_Markers
I don't know about SVG but this will produce a sharp edge in XAML (tested in XAML Crancher)
<Path Data="M 10 0 L 10 20 0 10 0 15 12.5 27.5 25 15 25 10 15 20 15 0 z" Stroke="Black"/>
Have a look at this example from the SVG spec. You may want to tweak the 'stroke-miterlimit' property depending on the sharpness of the corner.
I'd recommend to use something like inkscape and design the arrow (just draw a line, select it, go to object > filling / contour > pattern and contourline > endmarker)
then save as pdf, rename the *.pdf to *.ai, open blend and import the ai file as adobe illustrator.
It's a bit difficult, but I still prefer it over using blend.
(i translated from german, so some menu items might be slightly different)
After having done some research, I don't think such a thing is possible to do with a single path easily. I did manage to solve it all by finding a library of XAML arrows and then doing some trickery to rotate the arrow I wanted the way I wanted it.
I agree with the above answer.
You (and your readers) should note the advent of Raphael (If they have not already) and also my offering for the SVG world.
I have been working for a year with Raphael and SVG. This link to my homepage might interest you (To those who are still listening and/or switched on to the power of Inkscape/Cross Browser SVG)
http://www.irunmywebsite.com/
This home page is a hybrid of the W3C SVG recommendations and the javascript library and beneath it are all the resources to get up and running quickly with SVG and Raphael.
Regards Chasbeen.

Resources