Figma: Can't draw a straight line using PEN Tool - user-interface

When I'm trying to draw a line it always shows me to BEND the line.
How to draw a straight line in FIGMA using PEN Tool ?
Any keyboard key or anything... please help me, am a newbie.

To draw a straight line in Figma using the Pen Tool, you can do the following:
Select the Pen Tool from the toolbar on the left side of the screen.
Click on the canvas to create a starting point for the line.
Hold down the Shift key on your keyboard and click on a second point to create a straight line between the two points. The Shift key constrains the line to be straight, rather than curved.
Alternatively, you can draw a straight line by clicking and dragging with the Pen Tool. Just make sure to hold down the Shift key while dragging to constrain the line to be straight.

Related

Wacom Intus tablet is panning instead of painting

I've been trying to find some info on how to fix this, but I'm clearly typing the wrong stuff into google.
Basically imagine you have canvas in Photoshop.
You press the brush tool to paint a horizontal red line with your Wacom pen.
But instead of painting a red horizontal line, the screen pans to the right.
No red line, just moved the slider over to see the right of the screen.
I don't want that. I want to paint. I don't want to move the slider.
Also - every time I hold down the pen, a little dialog pops up that lets me change the brush settings. I don't want that either. If I hold the pen harder on the tablet, I'm trying to push down to make the stroke thicker. But instead of a thicker stroke, I get brush settings.
WTF Wacom?
Last Windows update caused this. Here's how to fix this: https://forums.adobe.com/thread/2398372

How to change orientation of sketch in CATIA using VB/Knowledgeware?

I am trying to create a knowledge template, such that when I choose a string value from a dropdown list of a multiple value parameter, the reaction fires according to the selection. For example, if I select "no cut", no pocket features are created. (or deleted if they already exist) If I select "top cut", a predefined sketch is used to drive the pocket feature. However, where I'm stuck, is that I want to define a "bottom cut" by changing the orientation of a positioned sketch. I envision it like this:
"bottom cut" selected from drop down list
change sketch support would be initiated
"Reverse V" would be
selected
sketch would be flipped around the xy plane
If "both top and bottom cut" is selected, it would return the sketch to top position (uncheck "Reverse V") and mirror the resultant pocket around XY
I have managed to accomplish everything but the "Reverse V" of "Change Sketch Support". No idea at all what is the best way to accomplish this.
So far, I've created both Knowledgeware actions, and VB actions. Open to any and all suggestions on this one.
Thank you.
Regarding that API for flipping objects orientation are not available, I suggest that you base your sketch orientation on a feature that can be easily flipped:
Create a line based on two "coordinates" points
Use positioned sketch and specify the support plane, the origin point, and orientation for the V direction by using the previously created line
You can now control the points coordinates to change the orientation of the line, and the sketch will follow.
The code will be simple, and the solution is very stable.
Assuming that the reference line is based on two points {0,0,0} and {x,0,0}, the code would be
if TopOrientation
{
GeoSet1\RefPoint\X=1mm
}
else
{
GeoSet1\RefPoint\X=-1mm
}
I hope it will help you.

how to make a single line text used as a glyph(mac develop)

Effect like the mac mail app,this image is a screenshot
how can i get effect like that. I try the cocoa text system,and don't find some useful things.
and I use the nstextattachment with textatttachmentcell initImageCell,obtain some effect like that,but it is not good,it is not very nature.
please some one give directions to me.
Those objects are not glyphs, they are controls, such as a subclass of a button. Custom controls have a drawing routine, which you override to draw a blue rectangle with round corners (a bezier path is the most flexible way to do so), then you draw the text (including the caret character) centered in the blue rectangle. Finally, handle the mouse events to do what you need to do when the control is clicked, such as popping up a menu in the right location.

wxToolBar changing device coordinates

Using the mouse I am drawing 2D shapes on the client area of a MDIChildFrame. Recently I have added a wxToolBar to the frame and when I now draw a shape on the client area it seems that the points have shifted by the size the toolbar. Imagine that with mouse I am clicking on (100,100) and drawing a line to (150,150); however, the line appears somewhere (75,75) to (125,125). By the way, wxMouseEvent GetPosition(); reports (100,100) to me.
Removing the toolbar fixes the problem however, I want to keep the toolbar for ease of tool selection.
I use the code:
m_ToolBar=new wxToolBar(this, wxID_ANY);
m_ToolBar->AddTool() //
m_ToolBar->Realize();
this->SetToolBar(m_ToolBar);
Any ideas will be appreciated.
You can always use wxWindow::GetClientAreaOrigin() to manually offset the coordinates by the toolbar height but normally this shouldn't be necessary, and if this doesn't happen with a "normal" frame but only happens with wxMDIChildFrame it would be a bug in wxWidgets that should be reported as usual.
It's also recommended to not draw over wxFrame itself but rather put a wxWindow into it and draw on it. This should also take care of your problem.

Get theme properties of Group Box lines

My goal is to draw a Group Box that is not rectangular but instead has the corners cut away. I do not mean just clipping the corners, but rather have a continuous closed path where the corners are "indented." I want this to match the colors/style of the current theme.
I noticed on Windows XP that the Group Box has 1-pixel gray lines, but on Windows 7 there is a 3D effect created by having a gray line next to a white line (the white line on the interior except on the bottom where it's below the gray line).
You can get the color of the text label of a Group Box using something like this:
COLORREF cref;
GetThemeColor(hTheme, BP_GROUPBOX, GBS_NORMAL, TMT_TEXTCOLOR, &cref);
So, I'm trying to figure out how to get the color(s) and/or properties of the lines used in a Group Box, then (I hope to) be able to draw the lines I want matching the Group Box style by separately drawing each piece of the shape I want. I'm not sure what properties are used to describe the lines or if functions line DrawRect will draw the 3D effect with a suitable Pen. Is there a way to set a Pen to draw these 3D effects (2-shade parallel lines)?
Thanks.
The thing I always find unexpected about groupboxes is that they are really a style of buttons. (BS_GROUPBOX).
Themed groupboxes (XP and later with classic mode off) use theme part BP_GROUPBOX in VSCLASS_BUTTON. You can use the usual theme APIs to get and draw. If your Group box needs text you can use DrawThemeText.
There are APIs for drawing non-themed group boxes too (e.g. DrawEdge), but I don't remember the details and it's unlikely that you need them.
As usual, I will point out that reproducing the behaviour of controls is always harder than you think it is going to be.
Martyn

Resources