Picture staggered tiling method based on CANVAS and storage medium

A picture and tiling technology, applied in the field of picture drawing, can solve problems such as user freezing or unresponsiveness, and low browser rendering performance, so as to avoid freezing problems, improve tiling efficiency, and optimize user experience.
CN112100538AActive Publication Date: 2020-12-18FUJIAN TIANQUAN EDUCATION TECH LTD

Patent Information

Authority / Receiving Office
CN ยท China
Current Assignee / Owner
FUJIAN TIANQUAN EDUCATION TECH LTD
Publication Date
2020-12-18

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention provides a canvas-based picture staggered tiling method and a storage medium. The method comprises the following steps of respectively setting an identifier for judging whether picturesare transversely staggered and an identifier for judging whether pictures are longitudinally staggered; a Canvas DOM being newly built, and the width and the height of the Canvas DOM being set to be the width and the height of the image; according to the width and the height of the image and the width and the height of the flatly-laid image, calculating to obtain a transverse flatly-laid number and a longitudinal flatly-laid number; and calling a 2D image drawing tool set of the Canvas DOM to execute nested loop operation by taking the transverse tiling number as a first layer and the longitudinal tiling number as a second layer and taking the tiled image and the width and the height of the tiled image as parameters by referring to the identifiers whether the transverse tiling number and the longitudinal tiling number are staggered or not, and drawing the tiled image in the Canvas DOM.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the field of picture drawing, in particular to a canvas-based picture interlaced tiling method and a storage medium. Background technique

[0002] Many image-related online products, such as online image editors, online product personalized logo customization, etc., in many cases have the need to provide image interleaved tiling function. The effect of interlaced tiling of pictures is as follows: figure 1 (staggered tile vertically) and figure 2 (horizontally staggered tiling).

[0003] The existing tiling scheme is to clone the Image DOM of an original image into an Image DOM with the number of length*width according to the tile size. figure 1 , is to clone 5*7=35 Image Doms to achieve. Due to the existence of a large number of Image Doms in this implementation method, the rendering performance of the browser will be very low. When the number is large, there will be a high probability that the user will be unable to opera...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More