inkscape arows not align with line - inkscape

I am trying to add some arrow along the line. the end arrow seems good but the arrows in the middle of the line isn't align with line. How can I make the middle arrow on the line?
I am using "Fill and stroke" property to add arrows:

The arrow is aligned with the mean of the two handles at that point, and you have a corner at this point. As Inkscape does not support individually set midmarkers, there is no work around with your curve defined as a single path using the midmarkers.
The solution is thus to
1) Break path at the point where you want the markers (edit path tool F2, then Break path icon)
2) Break apart path (Ctrl-Shift-K)
Then you can group the broken bits of your path (Ctrl-G), but combining them again will lead to other problems.

Related

how to create an outline of a text with fonts with separate polygons for each letter?

I want the outline of text with the standard Windows font "Bahnschrift". I tried to convert it with "Path->Object to Path" and then setting fill to X and stroke to black, but looks like the font is constructed with separate polygons for each letter. See this example:
Top is Bahnschrift, and bottom is Arial which works fine.
Is it possible to calculate somehow automatically the outline of the top text, without intersections, and without doing it all manually for all the letters? And including the right outline for letters with holes, like the "e"?
Some letters are even kind of twisted internally, looks pretty bad:
So I guess an algorithm to detect if it is a real hole, or if it is a hole from such twists and to ignore it, could be difficult.
Select the complete character in question. Then select from the drop down menu:
Path intersection followed by path union. This fixes the character font outline problem where the outline crosses into the body of the character.

How can I copy a text from a sfml window?

I've got this sfml window that displays a text and now I want to make it markable so that you can copy the text.
Any ideas how to do that?
If you just want to copy everything then just use
sf::Clipboard::setString(your_string_here);
If you want more features, here are some I implemented when I programmed a Code Editor in SFML.
I stored two indexes, the first is where the selection begins, and the second is where the section ends.
So in the string Hello World!, if you wanted to select World you would set the begin index to 6, and the end index to 10 or 11 (depending on whether you include the final character or not).
I render this using an sf::RectangleShape, since my editor supported multiple line selection boxes the code is more complicated, but for your example you would want to get the position of each character. I used my own text renderer, but SFML's sf::Text::findCharacterPos() should be able to help with that.
Next the copy part, this is just
sf::Clipboard::setString(getSelected());
where getSelected() is
return std::string::substr(selection_begin, selection_end - selection_begin);
If you want pasting as well then it is also simple:
eraseSelected();
insertStringAtCursor(sf::Clipboard::getString());
Which are both simple string operations as well (std::string::erase and reset the selection indexes, and std::string::insert).
Finally, to let the user change what is selected, either holding shift and pressing the arrow keys or clicking and dragging are both common ways, the former being easier than the latter.
For the former, check if shift is held and then if left or right is pressed update the indexes.
For the latter, you will need to handle mouse events and dragging. When dragging begins, set one of the indexes, whilst the mouse is moving and is dragging set the other index.

How to keep my path from moving when scaling using the "select and transform" tool

I'm trying to draw some block diagrams in inkscape using predefined paths that I adjust in length/height, but my paths are moving as soon as I adjust them using the "select and transform"-tool (F1).
Here is an example:
I snap my path to the correct position
I then adjust its size by dragging the bottem-left corner of the selection
My path has changed its position
I'm not sure why exactly this is happening, so I'd like to know how to keep it in place when changing its size.
First, enable Geometric bounding box in Preferences -> Tools -> Bounding box to use.
This ensures that the bounding box of a selection ends at the nodes and not at the visual limits of the selection (which includes half trace width, arrows, etc.). This way, when you scale your selection dragging from one side, nodes on the other side of the bounding box stay where they are.
Check here for documentation on transformations.
You should also uncheck the tool control icons for scaling line width and rounded corners (also explained in the link above), so that when you scale a selection, line widths remain fixed.

How do you increase the length of a line in Adobe After Effects?

How do you increase the length of a line after creating one? I have tried trim paths and stroke, but I don't know how to do it. Please help!
You created the line with a path inside a shape layer? You can select one of the points and drag it to the new position. (use the pen tool and you should be able to select either points)

How do I draw a line on a Lazarus form?

I often use a TPanel or TGroupBox to group my form controls.
Now I need to draw just a straight line like the border of a Panel or GroupBox.
How do I do this on LAZARUS?
Thanks in advance!
Note: The technique must work on both Linux and Windows
As an optical line separator you should use either the TBevel component with Shape property set to one of the following values bsTopLine, bsBottomLine, bsLeftLine or bsRightLine depending on which line you currently need and resize it to a smaller size (in your case you can use bsTopLine or bsBottomLine and resize the bevel vertically):
Or you can use a special component called TDividerBevel which except the single line adds to this optical divider also a caption:
Here's what I've finally done but I'm not sure if this is the RIGHT way so I won't accept my answer. If there's someone else who can point out any issues with this, please let me know. I found this pretty straightforward as well :)
Place a TGroupBox on the form.
Leave the Caption property blank. Now it should look like a panel with only borders.
Use the mouse and drag the bottom border towards the top. Now it looks like a line.
Well, I personally think this method is NOT efficient as it would take up more memory space than just a real straight line. Anyway, so far it seems to work for me :)
Here's the screenshot - look towards the bottom (just above the last text box). The only issues is that on the sides of the line, it shows the lines bending. I think I should set the properties correctly than dragging with the mouse.