341 references to Utility
ReachFramework (341)
AlphaFlattener\BrushProxy.cs (147)
229
if (!
Utility
.AreClose(ratio, 1.0))
367
_opacity =
Utility
.NormalizeOpacity(brush.Opacity);
411
if (! (_brush is SolidColorBrush) && !
Utility
.IsIdentity(_brush.RelativeTransform))
416
Matrix mat =
Utility
.MergeTransform(_brush.Transform, _brush.RelativeTransform, bounds);
437
Rect viewport =
Utility
.GetTileAbsoluteViewport(tb, bounds);
439
if (!
Utility
.IsRenderVisible(viewport))
461
Rect viewbox =
Utility
.GetTileAbsoluteViewbox(tb);
463
if (!
Utility
.IsValidViewbox(viewbox, tb.Stretch != Stretch.None))
488
lb.StartPoint =
Utility
.MapPoint(bounds, lb.StartPoint);
489
lb.EndPoint =
Utility
.MapPoint(bounds, lb.EndPoint);
509
rb.Center =
Utility
.MapPoint(bounds, rb.Center);
510
rb.GradientOrigin =
Utility
.MapPoint(bounds, rb.GradientOrigin);
561
_opacity *=
Utility
.NormalizeOpacity(opacity);
599
if (!
Utility
.IsOpaque(_opacity))
608
return
Utility
.IsOpaque(y.Color.ScA);
617
if (!
Utility
.IsOpaque(gs.Color.ScA))
668
Debug.Assert(
Utility
.IsRenderVisible(vb), "TileBrush.Viewbox area must be positive");
697
double opacity = _opacity *
Utility
.NormalizeOpacity(y.Color.ScA);
699
return
Utility
.IsTransparent(opacity);
708
double opacity = _opacity *
Utility
.NormalizeOpacity(gs.Color.ScA);
710
if (!
Utility
.IsTransparent(opacity))
721
if (
Utility
.IsTransparent(_opacity))
735
Debug.Assert(
Utility
.IsRenderVisible(vb), "TileBrush.Viewbox must be visible");
739
Matrix viewboxToViewportTransformHint =
Utility
.CreateViewboxToViewportTransform(db);
749
if (
Utility
.IsTransparent(_opacity))
858
return BlendColorWithBrush(_opacityOnly,
Utility
.Scale(sA.Color, _opacity), brushB, false);
865
return BlendColorWithBrush(brushB._opacityOnly,
Utility
.Scale(sB.Color, brushB._opacity), this, true);
1028
else if (!
Utility
.IsOpaque(_opacity))
1031
if (_opacity !=
Utility
.GetOpacity(_brush))
1094
if (
Utility
.IsTransparent(_opacity))
1114
if (isOpaque && (_brush.Transform == null ||
Utility
.IsScaleTranslate(_brush.Transform.Value)))
1123
Utility
.AreClose(linearBrush.StartPoint.X, linearBrush.EndPoint.X) ? 1 : size.Width,
1124
Utility
.AreClose(linearBrush.StartPoint.Y, linearBrush.EndPoint.Y) ? 1 : size.Height
1139
cost *=
Utility
.TransparencyCostFactor;
1200
if (!
Utility
.AreClose(bounds, viewport))
1252
Matrix viewboxToViewportTransformHint =
Utility
.CreateViewboxToViewportTransform(drawingBrush);
1333
DrawingBrush newBrush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
1410
DrawingBrush brush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
1446
if (!
Utility
.IsTransparent(_beforeDrawing.ScA))
1463
if (!
Utility
.IsTransparent(_afterDrawing.ScA))
1501
if (!
Utility
.IsTransparent(_beforeDrawing.ScA) || !
Utility
.IsTransparent(_afterDrawing.ScA) || _brushList == null)
1517
if (!
Utility
.IsTransparent(_beforeDrawing.ScA))
1528
if (_brushList == null && !
Utility
.IsTransparent(_brush.Opacity))
1535
if (!
Utility
.IsOpaque(inheritedOpacity))
1545
if (!
Utility
.IsOpaque(_opacity))
1582
if (!
Utility
.IsTransparent(_afterDrawing.ScA))
1606
if (!
Utility
.IsOpaque(p.Opacity))
1632
Geometry shape =
Utility
.TransformGeometry(p.GetShapeGeometry(), transform);
1634
shape =
Utility
.Exclude(viewbox, shape, p.Transform);
1671
if (
Utility
.IsTransparent(p.Opacity))
1701
Geometry shape =
Utility
.TransformGeometry(p.GetShapeGeometry(), drawingToWorldTransformHint);
1705
shape =
Utility
.Intersect(viewbox, shape, Matrix.Identity, out empty);
1712
if (!
Utility
.IsRenderVisible(shape.Bounds))
1735
Rect content =
Utility
.GetTileContentBounds(brush);
1740
Matrix viewboxToViewportTransform =
Utility
.CreateViewboxToViewportTransform(brush);
1841
b._afterDrawing =
Utility
.BlendColor(b._afterDrawing, color);
1845
b._beforeDrawing =
Utility
.BlendColor(color, b._beforeDrawing);
1864
result =
Utility
.Scale(color,
Utility
.NormalizeOpacity(stopColor.ScA) * _opacity);
1870
result =
Utility
.BlendColor(
Utility
.Scale(stopColor, _opacity), color);
1874
result =
Utility
.BlendColor(color,
Utility
.Scale(stopColor, _opacity));
1988
bool colorOpaque =
Utility
.IsOpaque(color.ScA);
2045
Color prevColor =
Utility
.NormalizeColor(prevStop.Color);
2057
currentColor =
Utility
.NormalizeColor(currentStop.Color);
2213
if (
Utility
.IsScaleTranslate(B2A))
2250
if (
Utility
.IsMultipleOf(viewportA.Width, width) &&
2251
Utility
.IsMultipleOf(viewportA.Height, height))
2279
if (
Utility
.IsZero(start.X - end.X))
2283
if (
Utility
.IsMultipleOf(viewportA.Height, height))
2288
else if (
Utility
.IsZero(start.Y - end.Y))
2292
if (
Utility
.IsMultipleOf(viewportA.Width, width))
2407
if ((gsA == null) || (gsB == null) || !
Utility
.IsZero(gsA.Offset - gsB.Offset))
2427
gs.Color =
Utility
.Scale(gsA.Color, gsB.Color.ScA);
2431
gs.Color =
Utility
.Scale(gsB.Color, gsA.Color.ScA);
2435
gs.Color =
Utility
.BlendColor(gsA.Color, gsB.Color);
2483
if (!
Utility
.IsZero(dxA - dxB) || !
Utility
.IsZero(dyA - dyB))
2513
if ((
Utility
.IsZero(dX) ||
Utility
.IsMultipleOf(dX, dxA * factor)) &&
2514
(
Utility
.IsZero(dY) ||
Utility
.IsMultipleOf(dY, dyA * factor)))
2560
if (!
Utility
.AreClose(rbA.Center * rbA.Transform.Value, rbB.Center * rbB.Transform.Value))
2566
if (!
Utility
.AreClose(rbA.GradientOrigin * rbA.Transform.Value, rbB.GradientOrigin * rbB.Transform.Value))
2572
if (
Utility
.AreClose(new Vector(Math.Abs(rbA.RadiusX), Math.Abs(rbA.RadiusY)) * rbA.Transform.Value,
2606
if ((sb != null) &&
Utility
.IsOpaque(sb.Opacity))
2623
if ((sb != null) &&
Utility
.IsOpaque(sb.Opacity))
2714
if (
Utility
.IsTransparent(color.ScA))
2815
if (
Utility
.IsTransparent(brush.Opacity))
2820
if (brush.Transform != null && !
Utility
.IsValid(brush.Transform.Value))
2830
if (
Utility
.IsTransparent(solidBrush.Color.ScA))
2853
if (!
Utility
.IsValid(stop.Offset))
2864
if (!
Utility
.IsRenderVisible(linearBrush.StartPoint) || !
Utility
.IsRenderVisible(linearBrush.EndPoint))
2877
if (!
Utility
.IsRenderVisible(radialBrush.Center) ||
2878
!
Utility
.IsRenderVisible(radialBrush.GradientOrigin) ||
2879
!
Utility
.IsRenderVisible(radialBrush.RadiusX) ||
2880
!
Utility
.IsRenderVisible(radialBrush.RadiusY))
2897
if (!
Utility
.IsRenderVisible(tileBrush.Viewport) ||
2898
!
Utility
.IsValidViewbox(tileBrush.Viewbox, tileBrush.Stretch != Stretch.None)
2904
Rect contentBounds =
Utility
.GetTileContentBounds(tileBrush);
2906
if (!
Utility
.IsRenderVisible(contentBounds))
2935
double opacity =
Utility
.NormalizeOpacity(brush.Opacity);
2953
if (!
Utility
.IsTransparent(gs.Color.ScA))
3037
Transform visualTransform =
Utility
.GetVisualTransform(visual);
3049
DrawingBrush drawingBrush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
3104
Matrix visualToWorldTransformHint =
Utility
.CreateViewboxToViewportTransform(vb, bounds);
3134
Transform visualTransform =
Utility
.GetVisualTransform(vb.Visual);
3146
DrawingBrush drawingBrush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
3183
DrawingBrush db =
Utility
.CreateNonInheritingDrawingBrush(drawingImage.Drawing);
3228
if (
Utility
.IsOpaque(colorA.ScA))
3262
if (
Utility
.IsOpaque(colorA.ScA))
3290
Utility
.Scale(
3292
Utility
.NormalizeOpacity(sB.Color.ScA) * brushB._opacity
3299
Utility
.BlendColor(
3301
Utility
.Scale(
3370
Debug.Assert(
Utility
.NormalizeOpacity(value) == value, "BrushProxy.Opacity must always be normalized");
3644
Utility
.IsValid(a) &&
Utility
.IsValid(r) &&
Utility
.IsValid(g) &&
Utility
.IsValid(b),
3658
c =
Utility
.NormalizeColor(c);
3686
return Color.FromArgb(
Utility
.OpacityToByte(m_a),
Utility
.ColorToByte(m_r),
Utility
.ColorToByte(m_g),
Utility
.ColorToByte(m_b));
3710
Debug.Assert(
Utility
.IsValid(opacity), "Opacity comes from BrushProxy, should be valid");
3911
if ((
Utility
.AreClose(offset, _offset[k])) &&
3912
Utility
.AreClose(offset, _offset[k + 1]))
4001
if (!
Utility
.IsRenderVisible(brush.StartPoint) ||
4002
!
Utility
.IsRenderVisible(brush.EndPoint) ||
4003
!
Utility
.IsValid(brushToWorldTransform))
4024
Geometry xgeometry =
Utility
.TransformGeometry(geometry, worldToXTransform);
4037
double xToWorldScale =
Utility
.GetScale(brushToWorldTransform);
4135
if (
Utility
.IsZero(gradientVector.X) &&
Utility
.IsZero(gradientVector.Y))
4179
Debug.Assert(
Utility
.IsValid(opacity), "Opacity comes from BrushProxy, should be valid");
4194
if (!
Utility
.IsRenderVisible(_x0) ||
4195
!
Utility
.IsRenderVisible(_y0) ||
4196
!
Utility
.IsRenderVisible(_u0) ||
4197
!
Utility
.IsRenderVisible(_v0) ||
4198
!
Utility
.IsRenderVisible(_rx) ||
4199
!
Utility
.IsRenderVisible(_ry))
4211
shape =
Utility
.TransformGeometry(shape, mat);
4294
bool simple =
Utility
.IsScaleTranslate(_trans);
AlphaFlattener\DrawingContext.cs (15)
82
clip =
Utility
.Intersect(_clip,
Utility
.TransformGeometry(clip, _transform), Matrix.Identity, out empty);
103
bool uniform =
Utility
.HasUniformScale(brushTrans, out scale);
114
geometry =
Utility
.InverseTransformGeometry(geometry, brushTrans);
116
geometry =
Utility
.TransformGeometry(geometry, brushTrans);
145
clip =
Utility
.Intersect(_clip,
Utility
.TransformGeometry(clip, _transform), Matrix.Identity, out empty);
170
clip =
Utility
.Intersect(_clip,
Utility
.TransformGeometry(clip, _transform), Matrix.Identity, out empty);
285
linear.Opacity = saveOpacity *
Utility
.NormalizeOpacity(color.ScA);
410
radial.Opacity = saveOpacity *
Utility
.NormalizeOpacity(color.ScA);
608
Matrix mat =
Utility
.CreateMappingTransform(bounds, width, height);
744
geometry =
Utility
.Intersect(geometry, clip, Matrix.Identity, out empty);
841
if (!
Utility
.IsRenderVisible(clip.Bounds))
856
Geometry imageClip =
Utility
.TransformGeometry(clip, imageTransform);
AlphaFlattener\Flattener.cs (11)
86
Debug.Assert(
Utility
.IsValid(opacity) &&
Utility
.IsValid(tree.Opacity), "Invalid opacity encountered, should've been normalized in conversion to Primitive");
117
if (
Utility
.IsTransparent(opacity))
124
Geometry transclip =
Utility
.TransformGeometry(tree.Clip, transform);
128
clip =
Utility
.Intersect(clip, transclip, Matrix.Identity, out empty);
145
(
Utility
.IsOpaque(opacity) && (opacityMask == null))) // For opaque subtree, just push trasform/clip into it.
199
(!gp.IsOpaque || !
Utility
.IsOpaque(opacity)))
230
Geometry transclip =
Utility
.TransformGeometry(tree.Clip, transform);
234
tree.Clip =
Utility
.Intersect(transclip, clip, Matrix.Identity, out empty);
238
empty =
Utility
.IsEmpty(tree.Clip, Matrix.Identity);
1146
g =
Utility
.TransformGeometry(g, p.Transform);
AlphaFlattener\ImageProxy.cs (12)
205
int op =
Utility
.OpacityToByte(opacity);
238
Utility
.BlendUnderColor(_pixels, _pixelWidth * _pixelHeight, color, opacity, opacityOnly);
243
if (opacityOnly || !
Utility
.IsOpaque(opacity) || !IsOpaque())
248
Utility
.BlendOverColor(_pixels, _pixelWidth * _pixelHeight, color, opacity, opacityOnly);
264
BlendUnderColor(
Utility
.Scale(sb.Color, brush.Opacity), 1, opacityOnly);
272
Utility
.BlendPixels(_pixels, opacityOnly, brushPixels, brush.OpacityOnly, _pixelWidth * _pixelHeight, _pixels);
305
BlendOverColor(
Utility
.Scale(sb.Color, brush.Opacity), 1.0, opacityOnly);
313
Utility
.BlendPixels(brushPixels, brush.OpacityOnly, _pixels, opacityOnly, _pixelWidth * _pixelHeight, _pixels);
336
if (!
Utility
.IsOpaque(c.ScA))
452
if (
Utility
.IsZero(dpiScaleX))
454
if (
Utility
.IsZero(dpiScaleY))
500
pixels =
Utility
.ClipPixels(_pixels, _pixelWidth, _pixelHeight, x0, y0, width, height);
AlphaFlattener\MetroDevice.cs (7)
145
if (
Utility
.IsTransparent(_opacity) || ((brush == null) && (pen == null || pen.Brush == null)) || (geometry == null))
299
opacity =
Utility
.NormalizeOpacity(opacity);
301
if (!
Utility
.IsValid(transform))
319
_clip =
Utility
.Intersect(_clip, clip, Matrix.Identity, out empty);
343
_clip =
Utility
.TransformGeometry(_clip, invertTransform); // transform inherited clip to this level
348
c.Clip =
Utility
.Intersect(clip, _clip, Matrix.Identity, out empty); // Combined with inherited attributes
360
if (
Utility
.ExtractOpacityMaskOpacity(opacityMask, out op, maskBounds))
AlphaFlattener\Optimizer.cs (3)
51
Matrix mat =
Utility
.CreateMappingTransform(m_bounds, width, height);
75
Geometry geometry =
Utility
.Intersect(primitive.GetShapeGeometry(), primitive.Clip, Matrix.Identity, out empty);
329
complexity =
Utility
.GetGeometryPointCount(geo);
AlphaFlattener\Primitive.cs (57)
168
shape =
Utility
.Intersect(shape, Clip, Matrix.Identity, out empty);
191
if (!
Utility
.IsValid(rect))
208
if (
Utility
.IsTransparent(Opacity))
218
if (!
Utility
.IsOpaque(Opacity))
220
factor =
Utility
.TransparencyCostFactor;
260
Debug.Assert(
Utility
.NormalizeOpacity(value) == value, "Opacity should be normalized during tree walking");
315
if (d == null || !
Utility
.IsRenderVisible(d.Bounds))
418
DrawingBrush db =
Utility
.CreateNonInheritingDrawingBrush(di.Drawing);
457
if (
Utility
.IsRenderVisible(dg))
494
BitmapSource bitmap =
Utility
.RasterizeDrawing(
523
primitive.Opacity =
Utility
.NormalizeOpacity(dg.Opacity);
576
if (!
Utility
.IsOpaque(opacity))
604
Opacity *=
Utility
.NormalizeOpacity(sb.Color.ScA) * OpacityMask.Opacity;
801
if ((drawingBrush == null) || !
Utility
.IsIdentity(drawingBrush.Transform))
843
brushGeometry =
Utility
.TransformGeometry(worldGeometry, worldToBrushTransform);
878
Matrix viewboxToViewportTransform =
Utility
.CreateViewboxToViewportTransform(
888
gdiRasterizeCost *=
Utility
.TransparencyCostFactor;
934
viewboxToViewportTransform =
Utility
.CreateViewboxToViewportTransform(
1055
double scale =
Utility
.GetScale(Transform);
1090
if (!
Utility
.IsOpaque(Opacity) || (OpacityMask != null))
1130
Geometry =
Utility
.Intersect(Geometry, Clip, Matrix.Identity, out empty);
1165
Geometry g =
Utility
.TransformGeometry(WidenGeometry, Transform);
1178
Geometry =
Utility
.Exclude(Geometry,
Utility
.InverseTransformGeometry(g, Transform), Transform);
1259
if (!
Utility
.IsOpaque(Opacity))
1282
if (
Utility
.IsTransparent(Opacity))
1320
if (
Utility
.HasUniformScale(Transform, out scale))
1332
Geometry =
Utility
.TransformGeometry(Geometry, Transform);
1378
Rect content =
Utility
.GetTileContentBounds(tb);
1389
Matrix viewboxTransform =
Utility
.CreateViewboxToViewportTransform(tb);
1393
Clip =
Utility
.Intersect(Clip, Geometry, Matrix.Identity, out empty);
1408
Transform =
Utility
.MultiplyTransform(tb.Transform, new MatrixTransform(Transform))
1411
Clip =
Utility
.Intersect(Clip, viewportGeometry, Matrix.Identity, out empty);
1429
if (!empty && tb.Transform != null && !
Utility
.IsScaleTranslate(tb.Transform.Value))
1450
Transform =
Utility
.MultiplyTransform(tb.Transform, new MatrixTransform(Transform))
1453
Clip =
Utility
.Intersect(Clip, contentGeometry, Matrix.Identity, out empty);
1484
geometryClip =
Utility
.TransformGeometry(geometryClip, inverseTransform);
1488
Geometry =
Utility
.Intersect(Geometry, geometryClip, Matrix.Identity, out empty);
1516
double realOpacity =
Utility
.NormalizeOpacity(realBrush.Opacity);
1535
double realOpacity =
Utility
.NormalizeOpacity(realBrush.Opacity);
1549
if (
Utility
.IsOpaque(opacity) && (opacityMask == null))
1595
Geometry g =
Utility
.TransformGeometry(WidenGeometry, Transform);
1693
Geometry g =
Utility
.TransformGeometry(WidenGeometry, Transform);
1708
if (
Utility
.Covers(g, _bounds))
1719
Clip =
Utility
.Exclude(Clip, g, Matrix.Identity);
1755
bounds =
Utility
.TransformRect(bounds, Transform);
1833
return
Utility
.TransformGeometry(new RectangleGeometry(DstRect), Transform);
1842
Clip =
Utility
.TransformGeometry(new RectangleGeometry(DstRect), Transform);
1845
Clip =
Utility
.Exclude(Clip, g, Matrix.Identity);
1916
if (
Utility
.IsTransparent(Opacity))
1931
Geometry dest =
Utility
.TransformGeometry(new RectangleGeometry(DstRect), Transform);
1933
if (
Utility
.Covers(Clip, dest)) // If dest is inside clipping region, ignore clipping
1963
return
Utility
.TransformRect(DstRect, Transform);
2074
if (
Utility
.IsTransparent(Opacity))
2116
return
Utility
.TransformRect(bounds, Transform);
2206
if (!
Utility
.FullyCovers(primitive.Clip, pshape))
2212
return
Utility
.FullyCovers(primitive.GetShapeGeometry(), pshape);
AlphaFlattener\PrimitiveList.cs (3)
253
bool skip = !
Utility
.IsRenderVisible(info.bounds) ||
Utility
.Disjoint(p.Clip, info.bounds);
269
if ((p.Clip != null) &&
Utility
.IsRectangle(p.Clip))
AlphaFlattener\PrimitiveRenderer.cs (10)
32
bounds =
Utility
.TransformGeometry(new RectangleGeometry(dest), trans);
120
cur =
Utility
.TransformGeometry(cur, trans);
259
Geometry diff =
Utility
.Exclude(bounds, topBounds, trans);
300
clip =
Utility
.Intersect(clip, bounds, Matrix.Identity, out empty);
359
inter =
Utility
.Intersect(cur, topBounds, Matrix.Identity, out empty);
416
Geometry diff =
Utility
.Exclude(cur, topBounds, Matrix.Identity);
469
Geometry clip =
Utility
.Intersect(inter,
Utility
.TransformGeometry(new RectangleGeometry(ip.DstRect), ip.Transform), ip.Transform, out empty);
474
Geometry clipImageSpace =
Utility
.TransformGeometry(clip, ReverseMap(ip.Transform, ip.DstRect, imageWidth, imageHeight));
528
Geometry geo =
Utility
.Intersect(cur, _clip, Matrix.Identity, out empty);
AlphaFlattener\Utility.cs (16)
1079
return
Utility
.NormalizeOpacity(opacity) > OpaqueEnough;
1088
return
Utility
.NormalizeOpacity(opacity) < AlmostTransparent;
1104
return
Utility
.IsOpaque(sb.Color.ScA);
1185
color =
Utility
.NormalizeColor(color);
1186
opacity =
Utility
.NormalizeOpacity(opacity);
1856
if (!
Utility
.IsRenderVisible(visualBounds))
2119
if (
Utility
.IsTransparent(
Utility
.NormalizeOpacity(drawing.Opacity)))
2125
if (drawing.ClipGeometry != null && !
Utility
.IsRenderVisible(drawing.ClipGeometry.Bounds))
2128
if (drawing.Transform != null && !
Utility
.IsValid(drawing.Transform.Value))
2518
(
Utility
.AreClose(point.X, _rect.Left) ||
Utility
.AreClose(point.X, _rect.Right)) &&
2519
(
Utility
.AreClose(point.Y, _rect.Top) ||
Utility
.AreClose(point.Y, _rect.Bottom));
2625
bool xzero =
Utility
.IsZero(vector.X);
2626
bool yzero =
Utility
.IsZero(vector.Y);
Serialization\DrawingContextFlattener.cs (9)
80
Debug.Assert(
Utility
.IsValid(opacity), "Invalid opacity should clip subtree");
116
clip =
Utility
.TransformGeometry(clip, Transform);
119
clip =
Utility
.Intersect(clip, Clip, Matrix.Identity, out empty);
365
if (!
Utility
.IsRenderVisible(bounds))
374
clip =
Utility
.TransformGeometry(clip, worldToVisualTransform);
385
if (!
Utility
.IsRenderVisible(bounds))
423
bitmap =
Utility
.RasterizeVisual(
924
opacity =
Utility
.NormalizeOpacity(opacity);
940
if (!
Utility
.IsOpaque(opacity))
Serialization\VisualSerializer.cs (36)
340
Color color =
Utility
.Scale(solidBrush.Color, solidBrush.Opacity);
438
Rect vb =
Utility
.GetTileAbsoluteViewbox(brush);
714
WriteAttr("StartPoint",
Utility
.MapPoint(bounds, lb.StartPoint));
715
WriteAttr("EndPoint",
Utility
.MapPoint(bounds, lb.EndPoint));
748
WriteAttr("Center",
Utility
.MapPoint(bounds, rb.Center));
751
WriteAttr("GradientOrigin",
Utility
.MapPoint(bounds, rb.GradientOrigin));
777
Matrix trans =
Utility
.MergeTransform(db.Transform, db.RelativeTransform, bounds);
782
Matrix drawingToWorldTransform =
Utility
.CreateViewboxToViewportTransform(db, bounds);
971
return
Utility
.IsZero(mat.M11 - mat.M22) &&
972
Utility
.IsZero(mat.M12) &&
973
Utility
.IsZero(mat.M21);
980
if (!
Utility
.IsIdentity(mat))
1194
if ((path.Transform != null) && !
Utility
.IsIdentity(path.Transform))
1367
Matrix mat =
Utility
.MergeTransform(trans, relative, bounds);
1369
if (!
Utility
.IsIdentity(mat))
1377
if (!
Utility
.IsIdentity(trans))
1439
pg =
Utility
.GetAsPathGeometry(geo);
1549
if (!forStroke && !
Utility
.IsRenderVisible(pg.Bounds))
1886
if (!
Utility
.IsRenderVisible(bounds))
1912
bool isLineGeometry =
Utility
.IsLineSegment(geometry);
1957
if (!
Utility
.IsIdentity(trans))
1961
if (
Utility
.IsOne(mat.M11) &&
1962
Utility
.IsOne(mat.M22) &&
1963
Utility
.IsZero(mat.M12) &&
1964
Utility
.IsZero(mat.M21))
1992
BitmapSource bitmap =
Utility
.RasterizeDrawing(
2006
Debug.Assert(
Utility
.IsScaleTranslate(bitmapToDrawingTransform));
2077
Uri uri =
Utility
.GetFontUri(glyphRun.GlyphTypeface);
2251
opacity *=
Utility
.NormalizeOpacity(sb.Color.ScA) *
Utility
.NormalizeOpacity(opacityMask.Opacity);
2256
if (!
Utility
.IsOne(opacity))
2313
if (!
Utility
.IsIdentity(transform))
2321
SetCoordinateFormat(Math.Min(
Utility
.GetScaleX(mat),
Utility
.GetScaleY(mat)));
2352
bool noTrans =
Utility
.IsIdentity(transform);
2363
Utility
.IsOne(opacity) &&
Serialization\VisualTreeFlattener.cs (14)
113
if (Microsoft.Internal.AlphaFlattener.
Utility
.NeedPremultiplyAlpha(value as BitmapSource))
388
if (
Utility
.IsTransparent(dg.Opacity))
393
if ((dg.Transform != null) || (dg.ClipGeometry != null) || (!
Utility
.IsOne(dg.Opacity)))
448
Transform trans =
Utility
.GetVisualTransform(visual);
455
if (trans != null && !
Utility
.IsValid(trans.Value))
461
if (!
Utility
.IsRenderVisible(bounds))
467
if ((clip != null) && !
Utility
.IsRenderVisible(clip.Bounds))
475
if (effect == null && (
Utility
.IsTransparent(opacity) || BrushProxy.IsEmpty(mask)))
482
if ((mask != null) &&
Utility
.IsBrushOpaque(mask))
551
clip =
Utility
.TransformGeometry(clip, clipToWorldSpace);
555
clip =
Utility
.Intersect(inheritedClipping, clip, Matrix.Identity, out empty);
664
if (d == null || !
Utility
.IsRenderVisible(d.Bounds))
706
if (
Utility
.IsRenderVisible(dg))
721
Utility
.NormalizeOpacity(dg.Opacity),
Serialization\XpsImageSerializationService.cs (1)
81
if (Microsoft.Internal.AlphaFlattener.
Utility
.NeedPremultiplyAlpha(bitmapSource))