;}Now the triangle out, but there is no border, this time only need to do two small triangles, one is the background color, one is the border color, and then use the positioning overlap together, remember their positioning to a pixel difference. As shown in the following:2. symbol character implementation is also to use two characters with absolute positioning to simulate, it can not simulate the triangle. Because it is a diamond, so it can only reveal half, the background and the background of
zoom in if the value is greater than 1.
Rotate (angle): rotate, angle is the rotation angle, unit is radian. If the value is greater than 0, it indicates clockwise rotation, and vice versa.
Effect:
2. Matrix Transformation
1: // obtain the canvas ID
2: var canvas = document.getElementById('canvas');
3: if (canvas == null)
4: {
5: return false;
6: }
7: // obtain the context
8: var context = canvas.getContext('2d');
9: // define the color
10:
. We want to create a square shape with border, with CSS3 Transfrom for 45 degrees of rotation.2.IE implementation-the CSS3 Transfrom compatibility scheme is implemented using the IE matrix filter.EXAMPLE
. Tips {
width:200px;
position:relative;
padding:10px;
Border:1pxsolid Blue;
Background-color:skyblue;
border-radius:5px;
}
. diamond{
-ms-filter: "Progid:DXImageTransform.Microsoft.Matrix (m11=0.7071067811865475, m12=-0.7071067
scale method accepts two parameters. X and y are the zooming factors of the horizontal and vertical axes respectively. They must both be positive values. If the value is smaller than 1.0, it means to zoom in. If the value is greater than 1.0, it means to zoom in. If the value is 1.0, there is no effect.Because the pixel size remains unchanged, the actual effect of this change is that there are more or less items to be painted in the canvas of the same size.The conversion example is as follows:F
scale method accepts two parameters. X and y are the zooming factors of the horizontal and vertical axes respectively. They must both be positive values. If the value is smaller than 1.0, it means to zoom in. If the value is greater than 1.0, it means to zoom in. If the value is 1.0, there is no effect.Because the pixel size remains unchanged, the actual effect of this change is that there are more or less items to be painted in the canvas of the same size.The conversion example is as follows:F
Because before there is a project demand is the time to update the UI countdown, before thought, this simple, with the timing or handler can be done, and performance is good, but the demand to the ListView, what,? A large number of view are required, that handle processing will hang Ah, What about the rotation? Too much memory and CPU, all of a sudden only thought of using handle to deal with, but the item too many how to manage it.? With such questions, thinking tangled, today inadvertently see
, both of which must be positive. The value is smaller than 1.0, which is larger than because the pixel size is constant, so the actual effect of this transformation is the same size of the canvas, can draw more or less things. Transformation example is as follows: Function Draw () { var ctx = document.getElementById (' Lesson01 '). GetContext (' 2d '); ctx.linewidth = 1.5; Ctx.fillrect (0,0,300,300); Ctx.translate (150,150);Ctx.rotate (MATH.PI/4);Ctx.scale (0.5,0.5);Ctx
objects. For example, when translating a point, it is to translate the coordinate system and then redraw the point.
Affine matrix:
M11 M12 0M21 m22 0DX dy 1DX and Dy control horizontal and vertical translationM11 and m22 control ScalingM12, m21 control rotation
If the coordinate of a vertex (x, y) transformed by the affine matrix is (x', y '),X' = M11 * x + m21 * Y + dxY' = m22 * Y + M12 * x + dy
Ii
Ie uses the filter only for rotate.
Suppose it corresponds to css3 rotate (30deg), then you only need to assign the following matrix value to the corresponding element of matrix filter and set sizingmethod = 'Auto expand:
Rad = 30 * Math. PI/180;
[
Cos rad,-Sin Rad
Sin rad, cos Rad
]
M11 M12 m21 m22 corresponds to the above four values
Filter: progid: DXImageTransform. Microsoft. Matrix (sizingmethod = "auto expand", M11 = 1,
transformations, including Translation, scaling, Flip, Rotation, and Shear ).This type of transformation can be represented by a 3 × 3 matrix, and the last row is (0, 0, 1 ). The transformation matrix converts the original coordinates (x, y) to the new coordinates (x ', y'). Here, the original coordinates and the new coordinates are regarded as the three-dimensional column vectors with the last line (1, the original column vector left multiplication transformation matrix obtains the new column
SelectQ1.productname, (Q2.m1 Power (2, orderdate) * salevolume as M1, (Q2.m2 Power (2, orderdate) * salevolume as m2, (Q2.m3 Power (2, orderdate) * salevolume as m3, (Q2.m4 Power (2, orderdate) * salevolume as M4, (Q2.m5 Power (2, orderdate) * salevolume as M5, (Q2.m6 Power (2, orderdate) * salevolume as M6, (Q2.m7 Power (2, orderdate) * salevolume as M7, (Q2.m8 Power (2, orderdate) * salevolume as M8, (Q2.m9 Power (2, orderdate) * salevolume as M9, (Q2.m10 Power (2, orderdate) * salev
); return d->state->worldMatrix * d->viewTransform();}Typical application: in the response to a mouse event, convert coordinates from physical coordinates to logical coordinates required by qpainterAffine Transformation and transmission TransformationQmatrix before qt4.3 (included) only supports affine transformation ).
Translation)
Scale)
Rotation)
Shear)
Qtransform supports perspective transformation ).
M11
()
Translate () Displacement Function
TranslateX ()
TranslateY ()
Base point of the transform-origin rotation (left top upper left corner)
(3) Note:Transform execution sequence problem-write first
(4)Matrix (a, B, c, d, e, f) matrix Functions
Default Value: matrix)
Scale by Matrix
X axis scaling a = x * a c = x * c e = x * e;
Y axis scaling B = y * B d = y * d f = y * f;
Realize displacement through matrix (No under ie)
X axis shift: e = e + x
Y axis displacement: f = f + y
Skew t
igpmatrix. Reset method.
Based on the function of each location, GDI + names each location as follows (the third column is meaningless and has no name ):
Please wait until M11 M12 0 then m21 m22 0 then DX dy 1 then again later
In the example above, the values of DX and Dy are not default, so the following test can be simpler:
Uses gdiplus; Procedure tform1.formcreate (Sender: tobject); var matrix1, matrix2: igpmatrix; begin
dream", go to the "I Information" channel, and select "Boutique shopping guide" to log on. The Palm Beijing Homepage Address is http: // 221.130.33.18; China Unicom mobile phone access interactive Horizon "online Beijing" channel, choose "Boutique shopping guide" Mobile Phone newspaper "to log on, the online Beijing home page address: http://wap.bj.uni-info.com.cn/hswap/index.jsp.3. directly enter the websiteMobile phone can be in the mobile phone browser address bar input http://mwap.sg.com.cn
The company is using partition online. The partition field of a table is incorrect and needs to be rebuilt. It turns out that there is no way to directly fix it using an SQL statement like modifying the primary key field or index field. Instead, you need to create a temporary table with a down time. So I carefully read the document and studied the details of partition.
When your company is online, the business is off-peak at a.m.. Execute:
Create temporary table
Create Table tbname_tmp (Shard_id
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.