How to create in indent of a rectangle in Inkscape? [closed] - indentation

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I've been trying to design something for laser cutting and couldn't figure out how to create an indent of a rectangle. Any ideas would be appreciated!

I am not exactly sure what you mean. Is it something like this?
If it is, here is how to do (or any other indent):
Draw your rectangle with the Create Rectangles and Squares tool. Transform it to a path (Path > Object to Path). You will loose the special properties of the Rectangle tool (F4) (you won't have the vertical rounding button any more) but now you'll be able to edit the object with the Edit paths by nodes tool (F2). Select this tool and your rectangle. You will see four nodes. To create a dent like in the picture you need more nodes:
Click the upper connecting line of the rectangle (step 1 in image below) and click the Insert new nodes into selected segments button (step 2) (be aware that you will only see this button when you select the Edit paths by nodes tool)
After, simply drag one node "inside" the rectangle (step 1 in image below). To get a round shape experiment for example with the Make selected nodes symmetric or the other buttons. You will notice little handles attached to the node, drag them around.

Another way: create a second object (int this case another rectangle), place it over the object you want to indent, select all and then Path->Difference (or Ctrl-+).

Related

How to develop ue4 plugins to simulate the viewpoint in unity 3D? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 months ago.
Improve this question
Unity 3d has two viewpoints, one is game and another isscene. when you move objects in scene you can see changes happened in game in the same time. while the reverse is true. But UE4 doesn't have this function. So I wonder if I can develop a plugin for UE4 to achieve that? does anyone have a clue?
enter image description here
Unreal 4: Go to Window -> Viewport 2. Drag the window somewhere and you will have 2 viewports:
Press play, only one viewport will display the "gameview" and the other remains as "sceneview" - Moving stuff in the 2nd Viewport will not update the game!
But I found this plugin:
https://github.com/jackknobel/GameViewportSync
You can see if that works for you or use it as a reference to get started developing your own plugin.

Alternative to QGraphicsDropShadowEffect for Frameless Window Shadow [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
Like many software applications today, I want my program to have a frameless window that still has a drop shadow to make it fit better with the OS. The first step was to set the window flags to Qt::FramelessWindowHint to remove the frame. But the trickier part is adding a drop shadow to the outside of the window. I opted to add a QGraphicsDropShadowEffect to a smaller base widget that holds everything and make QMainWindow transparent by setting the attribute Qt::WA_TranslucentBackground to true.
This seems to be a good solution for me, until I added a QSizeGrip to enable resizing of the window. Every time the window gets resized, a paint event is called and the QGraphicsDropShadowEffect needs to be recalculated. This results in SUPER choppy resizing and a big performance hit.
Are there any alternatives to QGraphicsDropShadowEffect that has better performance?
I came up with my own solution that I haven't seen on SO yet.
I ended up making 12 png images that when arranged in a set of layouts, gives the illusion of a drop shadow. I'm sure there are many ways to do this, but what I did was split each side into 3 parts. This accounts for many different ways the drop shadow could be set up (offset and corner rounding)
Here's an exaggerated diagram:
The red areas are QLabel's with pixmap icons aligned to the outer corners. The purple areas are QLabel's with repeating background images. The red areas sizes are fixed but the purple areas can expand freely as set via min/max sizes and layout stretching. The top and bottom edges are horizontal layouts and the left and right edges are vertical layouts.
This works very well for my use case and solved all the choppy problems :)

What is the right way to use a QStateMachine for a text adventure game? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have seen a couple topics about this already but they were a bit vague for me so I decided to make this. I'm working on a little adventure game just for fun in Qt, its basically just text on the screen and the player inputs commands into a line edit widget which I then process and do the related action/event. Thing is, I am a little confused on how to approach this. I don't want to dig myself a hole by manually coding in lots of commands and events per room because it seems to just be a pain later on. So then I thought about using some sort of database to store the information but which one should I use? I would love some advice from people who have tried something similar.
And here, these pictures are a rough outline of what I am trying to do.
Flowchart of states
Level tiles
Edit: I should add, the tiles for the level basically work like this. The light gray is a direction the player can move in, the dark gray parts are walls and the colors are various different actions you can do.
I don't particularly care for code, but I would like suggestions on what tools to use for this and maybe how to set them up right. Someone must know.

Drawing a temporary 'select' rectangle on a drawing area [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have a complex drawing on a Gtk DrawingArea widget and I wish to provide the user with a way to select a rectangle on it to expand for a closer view. I have managed to get the necessary mouse button events sorted out so that the rectangle can be selected, but it would be desirable to have the actual rectangle drawn on the display, moving around along with the mouse. I need to know how one does this without disturbing the underlying drawing (i.e. so I can erase the temporary rectangle as it changes size and shape without having to redraw the underlying picture).
Could someone tell me the correct name for this effect (so that I can google it) or does anyone know of an example, or a keyword to search the Gtk documentation?
Thank you.
You are looking for the Rubber Band technique.

How can I make a banner in QT, like the news banner of CNN/FOX? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
as the title says, I want to add my main window a banner in the bottom of the window that shows text that runs from left to right, just like you can see in your TV when watching fox/CNN...
I'm using QT 4.5.2
Thanks a lot :)
You have many options. You could:
Create a custom widget and override QWidget::paintEvent()
Drawing your text to an image and then repainting that image as often as needed
Creating a QGraphicsScene and then moving an appropriate text item around.
QTimeline and/or QTimer will likely be useful in your implementation. The key idea is that you need to draw something at different positions at consistent intervals. If you redraw frequently enough, it will look like an animation.