341 references to Utility
ReachFramework (341)
AlphaFlattener\BrushProxy.cs (147)
230
if (!
Utility
.AreClose(ratio, 1.0))
368
_opacity =
Utility
.NormalizeOpacity(brush.Opacity);
412
if (! (_brush is SolidColorBrush) && !
Utility
.IsIdentity(_brush.RelativeTransform))
417
Matrix mat =
Utility
.MergeTransform(_brush.Transform, _brush.RelativeTransform, bounds);
438
Rect viewport =
Utility
.GetTileAbsoluteViewport(tb, bounds);
440
if (!
Utility
.IsRenderVisible(viewport))
462
Rect viewbox =
Utility
.GetTileAbsoluteViewbox(tb);
464
if (!
Utility
.IsValidViewbox(viewbox, tb.Stretch != Stretch.None))
489
lb.StartPoint =
Utility
.MapPoint(bounds, lb.StartPoint);
490
lb.EndPoint =
Utility
.MapPoint(bounds, lb.EndPoint);
510
rb.Center =
Utility
.MapPoint(bounds, rb.Center);
511
rb.GradientOrigin =
Utility
.MapPoint(bounds, rb.GradientOrigin);
562
_opacity *=
Utility
.NormalizeOpacity(opacity);
600
if (!
Utility
.IsOpaque(_opacity))
609
return
Utility
.IsOpaque(y.Color.ScA);
618
if (!
Utility
.IsOpaque(gs.Color.ScA))
669
Debug.Assert(
Utility
.IsRenderVisible(vb), "TileBrush.Viewbox area must be positive");
698
double opacity = _opacity *
Utility
.NormalizeOpacity(y.Color.ScA);
700
return
Utility
.IsTransparent(opacity);
709
double opacity = _opacity *
Utility
.NormalizeOpacity(gs.Color.ScA);
711
if (!
Utility
.IsTransparent(opacity))
722
if (
Utility
.IsTransparent(_opacity))
736
Debug.Assert(
Utility
.IsRenderVisible(vb), "TileBrush.Viewbox must be visible");
740
Matrix viewboxToViewportTransformHint =
Utility
.CreateViewboxToViewportTransform(db);
750
if (
Utility
.IsTransparent(_opacity))
862
return BlendColorWithBrush(_opacityOnly,
Utility
.Scale(sA.Color, _opacity), brushB, false);
869
return BlendColorWithBrush(brushB._opacityOnly,
Utility
.Scale(sB.Color, brushB._opacity), this, true);
1032
else if (!
Utility
.IsOpaque(_opacity))
1035
if (_opacity !=
Utility
.GetOpacity(_brush))
1098
if (
Utility
.IsTransparent(_opacity))
1118
if (isOpaque && (_brush.Transform == null ||
Utility
.IsScaleTranslate(_brush.Transform.Value)))
1127
Utility
.AreClose(linearBrush.StartPoint.X, linearBrush.EndPoint.X) ? 1 : size.Width,
1128
Utility
.AreClose(linearBrush.StartPoint.Y, linearBrush.EndPoint.Y) ? 1 : size.Height
1143
cost *=
Utility
.TransparencyCostFactor;
1204
if (!
Utility
.AreClose(bounds, viewport))
1256
Matrix viewboxToViewportTransformHint =
Utility
.CreateViewboxToViewportTransform(drawingBrush);
1337
DrawingBrush newBrush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
1414
DrawingBrush brush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
1450
if (!
Utility
.IsTransparent(_beforeDrawing.ScA))
1467
if (!
Utility
.IsTransparent(_afterDrawing.ScA))
1505
if (!
Utility
.IsTransparent(_beforeDrawing.ScA) || !
Utility
.IsTransparent(_afterDrawing.ScA) || _brushList == null)
1521
if (!
Utility
.IsTransparent(_beforeDrawing.ScA))
1532
if (_brushList == null && !
Utility
.IsTransparent(_brush.Opacity))
1539
if (!
Utility
.IsOpaque(inheritedOpacity))
1549
if (!
Utility
.IsOpaque(_opacity))
1586
if (!
Utility
.IsTransparent(_afterDrawing.ScA))
1610
if (!
Utility
.IsOpaque(p.Opacity))
1636
Geometry shape =
Utility
.TransformGeometry(p.GetShapeGeometry(), transform);
1638
shape =
Utility
.Exclude(viewbox, shape, p.Transform);
1675
if (
Utility
.IsTransparent(p.Opacity))
1705
Geometry shape =
Utility
.TransformGeometry(p.GetShapeGeometry(), drawingToWorldTransformHint);
1709
shape =
Utility
.Intersect(viewbox, shape, Matrix.Identity, out empty);
1716
if (!
Utility
.IsRenderVisible(shape.Bounds))
1739
Rect content =
Utility
.GetTileContentBounds(brush);
1744
Matrix viewboxToViewportTransform =
Utility
.CreateViewboxToViewportTransform(brush);
1845
b._afterDrawing =
Utility
.BlendColor(b._afterDrawing, color);
1849
b._beforeDrawing =
Utility
.BlendColor(color, b._beforeDrawing);
1868
result =
Utility
.Scale(color,
Utility
.NormalizeOpacity(stopColor.ScA) * _opacity);
1874
result =
Utility
.BlendColor(
Utility
.Scale(stopColor, _opacity), color);
1878
result =
Utility
.BlendColor(color,
Utility
.Scale(stopColor, _opacity));
1992
bool colorOpaque =
Utility
.IsOpaque(color.ScA);
2049
Color prevColor =
Utility
.NormalizeColor(prevStop.Color);
2061
currentColor =
Utility
.NormalizeColor(currentStop.Color);
2217
if (
Utility
.IsScaleTranslate(B2A))
2254
if (
Utility
.IsMultipleOf(viewportA.Width, width) &&
2255
Utility
.IsMultipleOf(viewportA.Height, height))
2283
if (
Utility
.IsZero(start.X - end.X))
2287
if (
Utility
.IsMultipleOf(viewportA.Height, height))
2292
else if (
Utility
.IsZero(start.Y - end.Y))
2296
if (
Utility
.IsMultipleOf(viewportA.Width, width))
2411
if ((gsA == null) || (gsB == null) || !
Utility
.IsZero(gsA.Offset - gsB.Offset))
2431
gs.Color =
Utility
.Scale(gsA.Color, gsB.Color.ScA);
2435
gs.Color =
Utility
.Scale(gsB.Color, gsA.Color.ScA);
2439
gs.Color =
Utility
.BlendColor(gsA.Color, gsB.Color);
2487
if (!
Utility
.IsZero(dxA - dxB) || !
Utility
.IsZero(dyA - dyB))
2517
if ((
Utility
.IsZero(dX) ||
Utility
.IsMultipleOf(dX, dxA * factor)) &&
2518
(
Utility
.IsZero(dY) ||
Utility
.IsMultipleOf(dY, dyA * factor)))
2564
if (!
Utility
.AreClose(rbA.Center * rbA.Transform.Value, rbB.Center * rbB.Transform.Value))
2570
if (!
Utility
.AreClose(rbA.GradientOrigin * rbA.Transform.Value, rbB.GradientOrigin * rbB.Transform.Value))
2576
if (
Utility
.AreClose(new Vector(Math.Abs(rbA.RadiusX), Math.Abs(rbA.RadiusY)) * rbA.Transform.Value,
2610
if ((sb != null) &&
Utility
.IsOpaque(sb.Opacity))
2627
if ((sb != null) &&
Utility
.IsOpaque(sb.Opacity))
2718
if (
Utility
.IsTransparent(color.ScA))
2819
if (
Utility
.IsTransparent(brush.Opacity))
2824
if (brush.Transform != null && !
Utility
.IsValid(brush.Transform.Value))
2834
if (
Utility
.IsTransparent(solidBrush.Color.ScA))
2857
if (!
Utility
.IsValid(stop.Offset))
2868
if (!
Utility
.IsRenderVisible(linearBrush.StartPoint) || !
Utility
.IsRenderVisible(linearBrush.EndPoint))
2881
if (!
Utility
.IsRenderVisible(radialBrush.Center) ||
2882
!
Utility
.IsRenderVisible(radialBrush.GradientOrigin) ||
2883
!
Utility
.IsRenderVisible(radialBrush.RadiusX) ||
2884
!
Utility
.IsRenderVisible(radialBrush.RadiusY))
2901
if (!
Utility
.IsRenderVisible(tileBrush.Viewport) ||
2902
!
Utility
.IsValidViewbox(tileBrush.Viewbox, tileBrush.Stretch != Stretch.None)
2908
Rect contentBounds =
Utility
.GetTileContentBounds(tileBrush);
2910
if (!
Utility
.IsRenderVisible(contentBounds))
2939
double opacity =
Utility
.NormalizeOpacity(brush.Opacity);
2957
if (!
Utility
.IsTransparent(gs.Color.ScA))
3041
Transform visualTransform =
Utility
.GetVisualTransform(visual);
3053
DrawingBrush drawingBrush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
3108
Matrix visualToWorldTransformHint =
Utility
.CreateViewboxToViewportTransform(vb, bounds);
3138
Transform visualTransform =
Utility
.GetVisualTransform(vb.Visual);
3150
DrawingBrush drawingBrush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
3187
DrawingBrush db =
Utility
.CreateNonInheritingDrawingBrush(drawingImage.Drawing);
3232
if (
Utility
.IsOpaque(colorA.ScA))
3266
if (
Utility
.IsOpaque(colorA.ScA))
3294
Utility
.Scale(
3296
Utility
.NormalizeOpacity(sB.Color.ScA) * brushB._opacity
3303
Utility
.BlendColor(
3305
Utility
.Scale(
3374
Debug.Assert(
Utility
.NormalizeOpacity(value) == value, "BrushProxy.Opacity must always be normalized");
3648
Utility
.IsValid(a) &&
Utility
.IsValid(r) &&
Utility
.IsValid(g) &&
Utility
.IsValid(b),
3662
c =
Utility
.NormalizeColor(c);
3690
return Color.FromArgb(
Utility
.OpacityToByte(m_a),
Utility
.ColorToByte(m_r),
Utility
.ColorToByte(m_g),
Utility
.ColorToByte(m_b));
3714
Debug.Assert(
Utility
.IsValid(opacity), "Opacity comes from BrushProxy, should be valid");
3915
if ((
Utility
.AreClose(offset, _offset[k])) &&
3916
Utility
.AreClose(offset, _offset[k + 1]))
4005
if (!
Utility
.IsRenderVisible(brush.StartPoint) ||
4006
!
Utility
.IsRenderVisible(brush.EndPoint) ||
4007
!
Utility
.IsValid(brushToWorldTransform))
4028
Geometry xgeometry =
Utility
.TransformGeometry(geometry, worldToXTransform);
4041
double xToWorldScale =
Utility
.GetScale(brushToWorldTransform);
4139
if (
Utility
.IsZero(gradientVector.X) &&
Utility
.IsZero(gradientVector.Y))
4183
Debug.Assert(
Utility
.IsValid(opacity), "Opacity comes from BrushProxy, should be valid");
4198
if (!
Utility
.IsRenderVisible(_x0) ||
4199
!
Utility
.IsRenderVisible(_y0) ||
4200
!
Utility
.IsRenderVisible(_u0) ||
4201
!
Utility
.IsRenderVisible(_v0) ||
4202
!
Utility
.IsRenderVisible(_rx) ||
4203
!
Utility
.IsRenderVisible(_ry))
4215
shape =
Utility
.TransformGeometry(shape, mat);
4298
bool simple =
Utility
.IsScaleTranslate(_trans);
AlphaFlattener\DrawingContext.cs (15)
83
clip =
Utility
.Intersect(_clip,
Utility
.TransformGeometry(clip, _transform), Matrix.Identity, out empty);
104
bool uniform =
Utility
.HasUniformScale(brushTrans, out scale);
115
geometry =
Utility
.InverseTransformGeometry(geometry, brushTrans);
117
geometry =
Utility
.TransformGeometry(geometry, brushTrans);
146
clip =
Utility
.Intersect(_clip,
Utility
.TransformGeometry(clip, _transform), Matrix.Identity, out empty);
171
clip =
Utility
.Intersect(_clip,
Utility
.TransformGeometry(clip, _transform), Matrix.Identity, out empty);
286
linear.Opacity = saveOpacity *
Utility
.NormalizeOpacity(color.ScA);
411
radial.Opacity = saveOpacity *
Utility
.NormalizeOpacity(color.ScA);
609
Matrix mat =
Utility
.CreateMappingTransform(bounds, width, height);
745
geometry =
Utility
.Intersect(geometry, clip, Matrix.Identity, out empty);
842
if (!
Utility
.IsRenderVisible(clip.Bounds))
857
Geometry imageClip =
Utility
.TransformGeometry(clip, imageTransform);
AlphaFlattener\Flattener.cs (11)
87
Debug.Assert(
Utility
.IsValid(opacity) &&
Utility
.IsValid(tree.Opacity), "Invalid opacity encountered, should've been normalized in conversion to Primitive");
118
if (
Utility
.IsTransparent(opacity))
125
Geometry transclip =
Utility
.TransformGeometry(tree.Clip, transform);
129
clip =
Utility
.Intersect(clip, transclip, Matrix.Identity, out empty);
146
(
Utility
.IsOpaque(opacity) && (opacityMask == null))) // For opaque subtree, just push trasform/clip into it.
203
(!gp.IsOpaque || !
Utility
.IsOpaque(opacity)))
234
Geometry transclip =
Utility
.TransformGeometry(tree.Clip, transform);
238
tree.Clip =
Utility
.Intersect(transclip, clip, Matrix.Identity, out empty);
242
empty =
Utility
.IsEmpty(tree.Clip, Matrix.Identity);
1153
g =
Utility
.TransformGeometry(g, p.Transform);
AlphaFlattener\ImageProxy.cs (12)
206
int op =
Utility
.OpacityToByte(opacity);
239
Utility
.BlendUnderColor(_pixels, _pixelWidth * _pixelHeight, color, opacity, opacityOnly);
244
if (opacityOnly || !
Utility
.IsOpaque(opacity) || !IsOpaque())
249
Utility
.BlendOverColor(_pixels, _pixelWidth * _pixelHeight, color, opacity, opacityOnly);
265
BlendUnderColor(
Utility
.Scale(sb.Color, brush.Opacity), 1, opacityOnly);
273
Utility
.BlendPixels(_pixels, opacityOnly, brushPixels, brush.OpacityOnly, _pixelWidth * _pixelHeight, _pixels);
306
BlendOverColor(
Utility
.Scale(sb.Color, brush.Opacity), 1.0, opacityOnly);
314
Utility
.BlendPixels(brushPixels, brush.OpacityOnly, _pixels, opacityOnly, _pixelWidth * _pixelHeight, _pixels);
337
if (!
Utility
.IsOpaque(c.ScA))
453
if (
Utility
.IsZero(dpiScaleX))
455
if (
Utility
.IsZero(dpiScaleY))
501
pixels =
Utility
.ClipPixels(_pixels, _pixelWidth, _pixelHeight, x0, y0, width, height);
AlphaFlattener\MetroDevice.cs (7)
146
if (
Utility
.IsTransparent(_opacity) || ((brush == null) && (pen == null || pen.Brush == null)) || (geometry == null))
300
opacity =
Utility
.NormalizeOpacity(opacity);
302
if (!
Utility
.IsValid(transform))
320
_clip =
Utility
.Intersect(_clip, clip, Matrix.Identity, out empty);
344
_clip =
Utility
.TransformGeometry(_clip, invertTransform); // transform inherited clip to this level
349
c.Clip =
Utility
.Intersect(clip, _clip, Matrix.Identity, out empty); // Combined with inherited attributes
361
if (
Utility
.ExtractOpacityMaskOpacity(opacityMask, out op, maskBounds))
AlphaFlattener\Optimizer.cs (3)
52
Matrix mat =
Utility
.CreateMappingTransform(m_bounds, width, height);
76
Geometry geometry =
Utility
.Intersect(primitive.GetShapeGeometry(), primitive.Clip, Matrix.Identity, out empty);
330
complexity =
Utility
.GetGeometryPointCount(geo);
AlphaFlattener\Primitive.cs (57)
169
shape =
Utility
.Intersect(shape, Clip, Matrix.Identity, out empty);
192
if (!
Utility
.IsValid(rect))
209
if (
Utility
.IsTransparent(Opacity))
219
if (!
Utility
.IsOpaque(Opacity))
221
factor =
Utility
.TransparencyCostFactor;
261
Debug.Assert(
Utility
.NormalizeOpacity(value) == value, "Opacity should be normalized during tree walking");
316
if (d == null || !
Utility
.IsRenderVisible(d.Bounds))
419
DrawingBrush db =
Utility
.CreateNonInheritingDrawingBrush(di.Drawing);
458
if (
Utility
.IsRenderVisible(dg))
495
BitmapSource bitmap =
Utility
.RasterizeDrawing(
524
primitive.Opacity =
Utility
.NormalizeOpacity(dg.Opacity);
577
if (!
Utility
.IsOpaque(opacity))
605
Opacity *=
Utility
.NormalizeOpacity(sb.Color.ScA) * OpacityMask.Opacity;
802
if ((drawingBrush == null) || !
Utility
.IsIdentity(drawingBrush.Transform))
844
brushGeometry =
Utility
.TransformGeometry(worldGeometry, worldToBrushTransform);
879
Matrix viewboxToViewportTransform =
Utility
.CreateViewboxToViewportTransform(
889
gdiRasterizeCost *=
Utility
.TransparencyCostFactor;
935
viewboxToViewportTransform =
Utility
.CreateViewboxToViewportTransform(
1056
double scale =
Utility
.GetScale(Transform);
1091
if (!
Utility
.IsOpaque(Opacity) || (OpacityMask != null))
1134
Geometry =
Utility
.Intersect(Geometry, Clip, Matrix.Identity, out empty);
1169
Geometry g =
Utility
.TransformGeometry(WidenGeometry, Transform);
1182
Geometry =
Utility
.Exclude(Geometry,
Utility
.InverseTransformGeometry(g, Transform), Transform);
1263
if (!
Utility
.IsOpaque(Opacity))
1286
if (
Utility
.IsTransparent(Opacity))
1324
if (
Utility
.HasUniformScale(Transform, out scale))
1336
Geometry =
Utility
.TransformGeometry(Geometry, Transform);
1385
Rect content =
Utility
.GetTileContentBounds(tb);
1396
Matrix viewboxTransform =
Utility
.CreateViewboxToViewportTransform(tb);
1400
Clip =
Utility
.Intersect(Clip, Geometry, Matrix.Identity, out empty);
1415
Transform =
Utility
.MultiplyTransform(tb.Transform, new MatrixTransform(Transform))
1418
Clip =
Utility
.Intersect(Clip, viewportGeometry, Matrix.Identity, out empty);
1436
if (!empty && tb.Transform != null && !
Utility
.IsScaleTranslate(tb.Transform.Value))
1457
Transform =
Utility
.MultiplyTransform(tb.Transform, new MatrixTransform(Transform))
1460
Clip =
Utility
.Intersect(Clip, contentGeometry, Matrix.Identity, out empty);
1491
geometryClip =
Utility
.TransformGeometry(geometryClip, inverseTransform);
1495
Geometry =
Utility
.Intersect(Geometry, geometryClip, Matrix.Identity, out empty);
1523
double realOpacity =
Utility
.NormalizeOpacity(realBrush.Opacity);
1542
double realOpacity =
Utility
.NormalizeOpacity(realBrush.Opacity);
1556
if (
Utility
.IsOpaque(opacity) && (opacityMask == null))
1602
Geometry g =
Utility
.TransformGeometry(WidenGeometry, Transform);
1700
Geometry g =
Utility
.TransformGeometry(WidenGeometry, Transform);
1715
if (
Utility
.Covers(g, _bounds))
1726
Clip =
Utility
.Exclude(Clip, g, Matrix.Identity);
1762
bounds =
Utility
.TransformRect(bounds, Transform);
1840
return
Utility
.TransformGeometry(new RectangleGeometry(DstRect), Transform);
1849
Clip =
Utility
.TransformGeometry(new RectangleGeometry(DstRect), Transform);
1852
Clip =
Utility
.Exclude(Clip, g, Matrix.Identity);
1923
if (
Utility
.IsTransparent(Opacity))
1938
Geometry dest =
Utility
.TransformGeometry(new RectangleGeometry(DstRect), Transform);
1940
if (
Utility
.Covers(Clip, dest)) // If dest is inside clipping region, ignore clipping
1970
return
Utility
.TransformRect(DstRect, Transform);
2081
if (
Utility
.IsTransparent(Opacity))
2123
return
Utility
.TransformRect(bounds, Transform);
2213
if (!
Utility
.FullyCovers(primitive.Clip, pshape))
2219
return
Utility
.FullyCovers(primitive.GetShapeGeometry(), pshape);
AlphaFlattener\PrimitiveList.cs (3)
254
bool skip = !
Utility
.IsRenderVisible(info.bounds) ||
Utility
.Disjoint(p.Clip, info.bounds);
270
if ((p.Clip != null) &&
Utility
.IsRectangle(p.Clip))
AlphaFlattener\PrimitiveRenderer.cs (10)
33
bounds =
Utility
.TransformGeometry(new RectangleGeometry(dest), trans);
121
cur =
Utility
.TransformGeometry(cur, trans);
260
Geometry diff =
Utility
.Exclude(bounds, topBounds, trans);
301
clip =
Utility
.Intersect(clip, bounds, Matrix.Identity, out empty);
360
inter =
Utility
.Intersect(cur, topBounds, Matrix.Identity, out empty);
417
Geometry diff =
Utility
.Exclude(cur, topBounds, Matrix.Identity);
470
Geometry clip =
Utility
.Intersect(inter,
Utility
.TransformGeometry(new RectangleGeometry(ip.DstRect), ip.Transform), ip.Transform, out empty);
475
Geometry clipImageSpace =
Utility
.TransformGeometry(clip, ReverseMap(ip.Transform, ip.DstRect, imageWidth, imageHeight));
529
Geometry geo =
Utility
.Intersect(cur, _clip, Matrix.Identity, out empty);
AlphaFlattener\Utility.cs (16)
1080
return
Utility
.NormalizeOpacity(opacity) > OpaqueEnough;
1089
return
Utility
.NormalizeOpacity(opacity) < AlmostTransparent;
1105
return
Utility
.IsOpaque(sb.Color.ScA);
1186
color =
Utility
.NormalizeColor(color);
1187
opacity =
Utility
.NormalizeOpacity(opacity);
1857
if (!
Utility
.IsRenderVisible(visualBounds))
2120
if (
Utility
.IsTransparent(
Utility
.NormalizeOpacity(drawing.Opacity)))
2126
if (drawing.ClipGeometry != null && !
Utility
.IsRenderVisible(drawing.ClipGeometry.Bounds))
2129
if (drawing.Transform != null && !
Utility
.IsValid(drawing.Transform.Value))
2519
(
Utility
.AreClose(point.X, _rect.Left) ||
Utility
.AreClose(point.X, _rect.Right)) &&
2520
(
Utility
.AreClose(point.Y, _rect.Top) ||
Utility
.AreClose(point.Y, _rect.Bottom));
2626
bool xzero =
Utility
.IsZero(vector.X);
2627
bool yzero =
Utility
.IsZero(vector.Y);
Serialization\DrawingContextFlattener.cs (9)
81
Debug.Assert(
Utility
.IsValid(opacity), "Invalid opacity should clip subtree");
117
clip =
Utility
.TransformGeometry(clip, Transform);
120
clip =
Utility
.Intersect(clip, Clip, Matrix.Identity, out empty);
366
if (!
Utility
.IsRenderVisible(bounds))
375
clip =
Utility
.TransformGeometry(clip, worldToVisualTransform);
386
if (!
Utility
.IsRenderVisible(bounds))
424
bitmap =
Utility
.RasterizeVisual(
925
opacity =
Utility
.NormalizeOpacity(opacity);
941
if (!
Utility
.IsOpaque(opacity))
Serialization\VisualSerializer.cs (36)
341
Color color =
Utility
.Scale(solidBrush.Color, solidBrush.Opacity);
439
Rect vb =
Utility
.GetTileAbsoluteViewbox(brush);
715
WriteAttr("StartPoint",
Utility
.MapPoint(bounds, lb.StartPoint));
716
WriteAttr("EndPoint",
Utility
.MapPoint(bounds, lb.EndPoint));
749
WriteAttr("Center",
Utility
.MapPoint(bounds, rb.Center));
752
WriteAttr("GradientOrigin",
Utility
.MapPoint(bounds, rb.GradientOrigin));
778
Matrix trans =
Utility
.MergeTransform(db.Transform, db.RelativeTransform, bounds);
783
Matrix drawingToWorldTransform =
Utility
.CreateViewboxToViewportTransform(db, bounds);
972
return
Utility
.IsZero(mat.M11 - mat.M22) &&
973
Utility
.IsZero(mat.M12) &&
974
Utility
.IsZero(mat.M21);
981
if (!
Utility
.IsIdentity(mat))
1195
if ((path.Transform != null) && !
Utility
.IsIdentity(path.Transform))
1368
Matrix mat =
Utility
.MergeTransform(trans, relative, bounds);
1370
if (!
Utility
.IsIdentity(mat))
1378
if (!
Utility
.IsIdentity(trans))
1440
pg =
Utility
.GetAsPathGeometry(geo);
1550
if (!forStroke && !
Utility
.IsRenderVisible(pg.Bounds))
1887
if (!
Utility
.IsRenderVisible(bounds))
1913
bool isLineGeometry =
Utility
.IsLineSegment(geometry);
1958
if (!
Utility
.IsIdentity(trans))
1962
if (
Utility
.IsOne(mat.M11) &&
1963
Utility
.IsOne(mat.M22) &&
1964
Utility
.IsZero(mat.M12) &&
1965
Utility
.IsZero(mat.M21))
1993
BitmapSource bitmap =
Utility
.RasterizeDrawing(
2007
Debug.Assert(
Utility
.IsScaleTranslate(bitmapToDrawingTransform));
2078
Uri uri =
Utility
.GetFontUri(glyphRun.GlyphTypeface);
2252
opacity *=
Utility
.NormalizeOpacity(sb.Color.ScA) *
Utility
.NormalizeOpacity(opacityMask.Opacity);
2257
if (!
Utility
.IsOne(opacity))
2314
if (!
Utility
.IsIdentity(transform))
2322
SetCoordinateFormat(Math.Min(
Utility
.GetScaleX(mat),
Utility
.GetScaleY(mat)));
2353
bool noTrans =
Utility
.IsIdentity(transform);
2364
Utility
.IsOne(opacity) &&
Serialization\VisualTreeFlattener.cs (14)
114
if (Microsoft.Internal.AlphaFlattener.
Utility
.NeedPremultiplyAlpha(value as BitmapSource))
389
if (
Utility
.IsTransparent(dg.Opacity))
394
if ((dg.Transform != null) || (dg.ClipGeometry != null) || (!
Utility
.IsOne(dg.Opacity)))
449
Transform trans =
Utility
.GetVisualTransform(visual);
456
if (trans != null && !
Utility
.IsValid(trans.Value))
462
if (!
Utility
.IsRenderVisible(bounds))
468
if ((clip != null) && !
Utility
.IsRenderVisible(clip.Bounds))
476
if (effect == null && (
Utility
.IsTransparent(opacity) || BrushProxy.IsEmpty(mask)))
483
if ((mask != null) &&
Utility
.IsBrushOpaque(mask))
552
clip =
Utility
.TransformGeometry(clip, clipToWorldSpace);
556
clip =
Utility
.Intersect(inheritedClipping, clip, Matrix.Identity, out empty);
665
if (d == null || !
Utility
.IsRenderVisible(d.Bounds))
707
if (
Utility
.IsRenderVisible(dg))
722
Utility
.NormalizeOpacity(dg.Opacity),
Serialization\XpsImageSerializationService.cs (1)
82
if (Microsoft.Internal.AlphaFlattener.
Utility
.NeedPremultiplyAlpha(bitmapSource))