Use the shell to output rectangles, hollow rectangles, triangles, rhombuses, parallelograms, trapezoids, and ninety-nine multiplication ratios…

shell script exercise multiple loops 1. Use a loop to draw a rectangle with a length of 20 and a width of 10 #!/bin/bash for ((i=1;i<=10;i + + )) #The outer loop loops ten times. This is how many lines are output, that is, the width do for ((n=1;n<=20;n + + )) #The inner loop […]

[AMAP] Overlay/Draw points/Draw polylines/Draw polygons/Draw rectangles/Draw circles

Official example https://lbs.amap.com/demo/javascript-api/example/mouse-operate-map/mouse-draw-overlayers <!doctype html> <html lang=”en”> <head> <meta charset=”utf-8″> <meta http-equiv=”X-UA-Compatible” content=”chrome=1″> <meta name=”viewport” content=”initial-scale=1.0, user-scalable=no, width=device-width”> <link rel=”stylesheet” href=”https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css” type=”text/css”> <style> html,body,#container{<!– –> height: 100% } .input-item{<!– –> height: 2.2rem; } .btn{<!– –> width: 6rem; margin: 0 1rem 0 2rem; } .input-text{<!– –> width: 4rem; margin-right:1rem; } </style> <title>Mouse tool drawing</title> </head> <body> […]

Problems and solutions encountered when QML dynamically creates a large number of controls (such as rectangles) in batches

The business needs to create 468 controls (rectangles) to graphically represent certain data. These 468 rectangles are evenly distributed in three large rectangles. Each rectangle serves as a page, and the visiable attribute of each page is controlled through navigation buttons. When the program was originally running, these 468 rectangles could still be displayed perfectly. […]

QT graphics drawing (C++) [realizes the drawing of pencils, lines, rectangles, and ellipses]

To draw in QT, you first need to create a QRect container to store the attributes of the graphic, and then use QPainter to create a brush to draw in QImage, QPixmap, QBitmap and QPicture. 1. Header file #include <QPainter> #include <QRect> #include <QColor> #include <QVector> #include <QPoint> 2. Create container (1) Create a QRect […]

[html local tool] html+JS implements a super-looking drawing board/graffiti board, with brushes, rectangles, circles, lines, texts, erasers, and undo, restore, and save functions

Foreword Hello everyone, this is Fu Hua. Today we will use pure html + js to implement a drawing board. It needs the following functions: brush tool free brush rectangle round straight line text input Brush and Eraser Resize Thickness Adjust brush color Eraser save as picture revoke Redo (anti-undo) If the above functions are […]

[LCD application programming] draw points, lines, rectangles

When obtaining the LCD screen parameter information before, I learned that the LCD screen is a FrameBuffer device, and operating the FrameBuffer device is actually reading and writing /dev/fb0 files. In addition, the LCD screen contains multiple pixels, and the essence of drawing points, lines, and rectangles is to modify the colors of these pixels. […]

[Qt implements a drawing board, based on QWidget, which can draw straight lines and rectangles]

【Qt implements a drawing board, based on QWidget, which can draw straight lines and rectangles】 Introduction Show results source code mainwindow.h mainwindow.cpp painterwidget.h painterwidget.cpp shapes.h (management) line.h line.cpp rect.h rect.cpp Knot For more content click: Qt column Introduction Here I will only make a simple drawing board program, which is generally able to draw straight […]

Opencv dynamically draws rectangles and polygons and saves coordinates

Directory 1 Draw rectangles and polygons, the mode is controlled by the keyboard 2 After the modification, the polygon is drawn directly by default, press the middle mouse button to switch to the rectangle drawing mode Now drawing rectangles and polygons can only draw one at a time, do you need to modify it so […]