Tag:rectangle

  • JS + CSS3 to achieve image slider effect

    Time:2020-7-8

    effect Analyzing the animation can be divided into two steps: Add an animation class when the mouse moves in or out Realize the animation class and move in and out animation Picture waterfall flow layout can refer to Vue handwritten picture waterfall flow component (with source code) HTML and CSS layout The layout is relatively […]

  • Gradients: filling linear text with canvas

    Time:2020-7-8

    preface In canvas, the horizontal or vertical linear gradient of text filling can be easily realized, while the gradient with angle is much more complicated; as shown below, suppose that the width of the text rectangle isW, the height isHThe coordinates of the upper left corner areX, Y。 Guess and answer Two answers are given […]

  • Yes diplay:flex Understanding of layout

    Time:2020-6-20

    1、 Flex layout – Introduction Flex is the abbreviation of flexible box, which means “flexible layout”. It is used to provide maximum flexibility for the box model. It aims to provide a more effective layout, alignment, and enable the space between the sub elements to be allocated even when the size of the sub elements […]

  • collision detection

    Time:2020-6-16

    Intron collision detection (collision detection) I met this thing when I was looking for canvas related materials. I was curious, so I tried to understand it. Origin My GitHub brief introduction A concept similar to collision detection:Hit detection(hit testing) is also widely used. In computer graphics programming, hit detection is the process of determining whether […]

  • Drawing a rectangle with a brush and canvas in Android

    Time:2020-5-25

    scene In Android, the brush uses the paint class, and the canvas uses the canvas class to represent it. Basic steps of drawing First, write a custom view class inherited from view, then rewrite its OnDraw method, and finally add the custom view to actvity. effect     Note: Blog:https://blog.csdn.net/badao_liumang_qizhi Official accountDomineering procedural apeGet programming […]

  • Implementation of a new bitmap based on bitmap + text generation

    Time:2020-5-9

       Note: the parameter content is the content of generating two-dimensional code bitmap. The two-dimensional code bitmap generates a new bitmap in combination with the text title   package info.ecloud.merchant.util; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import com.google.zxing.BarcodeFormat; import com.google.zxing.EncodeHintType; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; import com.journeyapps.barcodescanner.BarcodeEncoder; import java.util.Hashtable; public class SaveImageUtils { private […]

  • Detailed explanation of the attributes of flexible layout (display:flex;)

    Time:2020-4-29

    1、 Flex layout – Introduction Flex is the abbreviation of flexible box, which means “flexible layout”. It is used to provide maximum flexibility for the box model. It aims to provide a more effective layout, alignment, and enable the space between the sub elements to be allocated even when the size of the sub elements […]

  • Basic use of canvas

    Time:2020-4-1

    Canvas can be used to make photo sets or animation of checkpoints, or even real-time video processing and rendering. Here I will introduce the simple use of canvas 1: Canvas label The canvas tag and the IMG tag look very similar, Canvas has only two optional attributes, width and height. There are no SRC and […]

  • H5 canvas that Xiaobai can understand

    Time:2020-3-11

    Canvas is a common front-end technology, but because there are many APIs and complicated use, and there are certain requirements for the mathematical foundation, spatial imagination ability and even aesthetic of programmers, so there are not many front-end technologies that are really good at canvas, but it does not mean that everyone is not good […]

  • WPF inkcanvas draws rectangles and ellipses

    Time:2020-3-1

    I mentioned the basic operation of inkcanvas before. Here is an example to illustrate the specific application: drawing rectangle and ellipse. Design sketch Xaml code <Window x:Class=”WPF_InkCanvas.ROI_InkCanvas” xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” xmlns:d=”http://schemas.microsoft.com/expression/blend/2008″ xmlns:mc=”http://schemas.openxmlformats.org/markup-compatibility/2006″ xmlns:local=”clr-namespace:WPF_InkCanvas” mc:Ignorable=”d” Title=”ROI_InkCanvas” Height=”450″ Width=”800″> <Grid> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition Height=”auto”/> </Grid.RowDefinitions> <Image Name=”imgMeasure” HorizontalAlignment=”Center” Stretch=”Uniform”/> <InkCanvas Name=”inkCanvasMeasure” EditingMode=”None” Background=”Transparent” Strokes=”{Binding InkStrokes, Mode=TwoWay}” HorizontalAlignment=”Center” Width=”{Binding […]

  • Pyqt5 method of drawing rectangle in the picture displayed in label

    Time:2020-1-26

    When using QT to write GUI program, we often need some interactive operations, such as mouse events, keyboard events and so on. What we want to achieve today is to draw a rectangular box in the image already displayed in the label, so as to carry out the next operation (such as zooming in the […]

  • C ා define geometry with abstract class

    Time:2020-1-16

    using System;/*using System.Data;*/namespace tx{    abstract class tx    {        public double chang;        public double kuan;        public double r;        public double pai;        public tx(double chang, double kuan)        {            this.chang = chang;            this.kuan = kuan;           /* this.r = r;            this.pai = pai*/;        }        public abstract void mj();    }    class Cfx:tx    {        public Cfx(double chang, double kuan) : base(chang,kuan) […]