341 references to Utility
ReachFramework (341)
AlphaFlattener\BrushProxy.cs (147)
230
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))
861
return BlendColorWithBrush(_opacityOnly,
Utility
.Scale(sA.Color, _opacity), brushB, false);
868
return BlendColorWithBrush(brushB._opacityOnly,
Utility
.Scale(sB.Color, brushB._opacity), this, true);
1031
else if (!
Utility
.IsOpaque(_opacity))
1034
if (_opacity !=
Utility
.GetOpacity(_brush))
1097
if (
Utility
.IsTransparent(_opacity))
1117
if (isOpaque && (_brush.Transform == null ||
Utility
.IsScaleTranslate(_brush.Transform.Value)))
1126
Utility
.AreClose(linearBrush.StartPoint.X, linearBrush.EndPoint.X) ? 1 : size.Width,
1127
Utility
.AreClose(linearBrush.StartPoint.Y, linearBrush.EndPoint.Y) ? 1 : size.Height
1142
cost *=
Utility
.TransparencyCostFactor;
1203
if (!
Utility
.AreClose(bounds, viewport))
1255
Matrix viewboxToViewportTransformHint =
Utility
.CreateViewboxToViewportTransform(drawingBrush);
1336
DrawingBrush newBrush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
1413
DrawingBrush brush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
1448
if (!
Utility
.IsTransparent(_beforeDrawing.ScA))
1465
if (!
Utility
.IsTransparent(_afterDrawing.ScA))
1503
if (!
Utility
.IsTransparent(_beforeDrawing.ScA) || !
Utility
.IsTransparent(_afterDrawing.ScA) || _brushList == null)
1519
if (!
Utility
.IsTransparent(_beforeDrawing.ScA))
1530
if (_brushList == null && !
Utility
.IsTransparent(_brush.Opacity))
1537
if (!
Utility
.IsOpaque(inheritedOpacity))
1547
if (!
Utility
.IsOpaque(_opacity))
1584
if (!
Utility
.IsTransparent(_afterDrawing.ScA))
1608
if (!
Utility
.IsOpaque(p.Opacity))
1634
Geometry shape =
Utility
.TransformGeometry(p.GetShapeGeometry(), transform);
1636
shape =
Utility
.Exclude(viewbox, shape, p.Transform);
1673
if (
Utility
.IsTransparent(p.Opacity))
1703
Geometry shape =
Utility
.TransformGeometry(p.GetShapeGeometry(), drawingToWorldTransformHint);
1707
shape =
Utility
.Intersect(viewbox, shape, Matrix.Identity, out empty);
1714
if (!
Utility
.IsRenderVisible(shape.Bounds))
1737
Rect content =
Utility
.GetTileContentBounds(brush);
1742
Matrix viewboxToViewportTransform =
Utility
.CreateViewboxToViewportTransform(brush);
1843
b._afterDrawing =
Utility
.BlendColor(b._afterDrawing, color);
1847
b._beforeDrawing =
Utility
.BlendColor(color, b._beforeDrawing);
1866
result =
Utility
.Scale(color,
Utility
.NormalizeOpacity(stopColor.ScA) * _opacity);
1872
result =
Utility
.BlendColor(
Utility
.Scale(stopColor, _opacity), color);
1876
result =
Utility
.BlendColor(color,
Utility
.Scale(stopColor, _opacity));
1990
bool colorOpaque =
Utility
.IsOpaque(color.ScA);
2047
Color prevColor =
Utility
.NormalizeColor(prevStop.Color);
2059
currentColor =
Utility
.NormalizeColor(currentStop.Color);
2215
if (
Utility
.IsScaleTranslate(B2A))
2252
if (
Utility
.IsMultipleOf(viewportA.Width, width) &&
2253
Utility
.IsMultipleOf(viewportA.Height, height))
2281
if (
Utility
.IsZero(start.X - end.X))
2285
if (
Utility
.IsMultipleOf(viewportA.Height, height))
2290
else if (
Utility
.IsZero(start.Y - end.Y))
2294
if (
Utility
.IsMultipleOf(viewportA.Width, width))
2409
if ((gsA == null) || (gsB == null) || !
Utility
.IsZero(gsA.Offset - gsB.Offset))
2428
gs.Color =
Utility
.Scale(gsA.Color, gsB.Color.ScA);
2432
gs.Color =
Utility
.Scale(gsB.Color, gsA.Color.ScA);
2436
gs.Color =
Utility
.BlendColor(gsA.Color, gsB.Color);
2484
if (!
Utility
.IsZero(dxA - dxB) || !
Utility
.IsZero(dyA - dyB))
2514
if ((
Utility
.IsZero(dX) ||
Utility
.IsMultipleOf(dX, dxA * factor)) &&
2515
(
Utility
.IsZero(dY) ||
Utility
.IsMultipleOf(dY, dyA * factor)))
2561
if (!
Utility
.AreClose(rbA.Center * rbA.Transform.Value, rbB.Center * rbB.Transform.Value))
2567
if (!
Utility
.AreClose(rbA.GradientOrigin * rbA.Transform.Value, rbB.GradientOrigin * rbB.Transform.Value))
2573
if (
Utility
.AreClose(new Vector(Math.Abs(rbA.RadiusX), Math.Abs(rbA.RadiusY)) * rbA.Transform.Value,
2607
if ((sb != null) &&
Utility
.IsOpaque(sb.Opacity))
2624
if ((sb != null) &&
Utility
.IsOpaque(sb.Opacity))
2715
if (
Utility
.IsTransparent(color.ScA))
2816
if (
Utility
.IsTransparent(brush.Opacity))
2821
if (brush.Transform != null && !
Utility
.IsValid(brush.Transform.Value))
2831
if (
Utility
.IsTransparent(solidBrush.Color.ScA))
2854
if (!
Utility
.IsValid(stop.Offset))
2865
if (!
Utility
.IsRenderVisible(linearBrush.StartPoint) || !
Utility
.IsRenderVisible(linearBrush.EndPoint))
2878
if (!
Utility
.IsRenderVisible(radialBrush.Center) ||
2879
!
Utility
.IsRenderVisible(radialBrush.GradientOrigin) ||
2880
!
Utility
.IsRenderVisible(radialBrush.RadiusX) ||
2881
!
Utility
.IsRenderVisible(radialBrush.RadiusY))
2898
if (!
Utility
.IsRenderVisible(tileBrush.Viewport) ||
2899
!
Utility
.IsValidViewbox(tileBrush.Viewbox, tileBrush.Stretch != Stretch.None)
2905
Rect contentBounds =
Utility
.GetTileContentBounds(tileBrush);
2907
if (!
Utility
.IsRenderVisible(contentBounds))
2936
double opacity =
Utility
.NormalizeOpacity(brush.Opacity);
2954
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);
3132
Transform visualTransform =
Utility
.GetVisualTransform(vb.Visual);
3144
DrawingBrush drawingBrush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
3181
DrawingBrush db =
Utility
.CreateNonInheritingDrawingBrush(drawingImage.Drawing);
3226
if (
Utility
.IsOpaque(colorA.ScA))
3260
if (
Utility
.IsOpaque(colorA.ScA))
3288
Utility
.Scale(
3290
Utility
.NormalizeOpacity(sB.Color.ScA) * brushB._opacity
3297
Utility
.BlendColor(
3299
Utility
.Scale(
3369
Debug.Assert(
Utility
.NormalizeOpacity(value) == value, "BrushProxy.Opacity must always be normalized");
3643
Utility
.IsValid(a) &&
Utility
.IsValid(r) &&
Utility
.IsValid(g) &&
Utility
.IsValid(b),
3657
c =
Utility
.NormalizeColor(c);
3685
return Color.FromArgb(
Utility
.OpacityToByte(m_a),
Utility
.ColorToByte(m_r),
Utility
.ColorToByte(m_g),
Utility
.ColorToByte(m_b));
3709
Debug.Assert(
Utility
.IsValid(opacity), "Opacity comes from BrushProxy, should be valid");
3910
if ((
Utility
.AreClose(offset, _offset[k])) &&
3911
Utility
.AreClose(offset, _offset[k + 1]))
4000
if (!
Utility
.IsRenderVisible(brush.StartPoint) ||
4001
!
Utility
.IsRenderVisible(brush.EndPoint) ||
4002
!
Utility
.IsValid(brushToWorldTransform))
4023
Geometry xgeometry =
Utility
.TransformGeometry(geometry, worldToXTransform);
4036
double xToWorldScale =
Utility
.GetScale(brushToWorldTransform);
4134
if (
Utility
.IsZero(gradientVector.X) &&
Utility
.IsZero(gradientVector.Y))
4178
Debug.Assert(
Utility
.IsValid(opacity), "Opacity comes from BrushProxy, should be valid");
4193
if (!
Utility
.IsRenderVisible(_x0) ||
4194
!
Utility
.IsRenderVisible(_y0) ||
4195
!
Utility
.IsRenderVisible(_u0) ||
4196
!
Utility
.IsRenderVisible(_v0) ||
4197
!
Utility
.IsRenderVisible(_rx) ||
4198
!
Utility
.IsRenderVisible(_ry))
4210
shape =
Utility
.TransformGeometry(shape, mat);
4293
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);
170
clip =
Utility
.Intersect(_clip,
Utility
.TransformGeometry(clip, _transform), Matrix.Identity, out empty);
284
linear.Opacity = saveOpacity *
Utility
.NormalizeOpacity(color.ScA);
409
radial.Opacity = saveOpacity *
Utility
.NormalizeOpacity(color.ScA);
607
Matrix mat =
Utility
.CreateMappingTransform(bounds, width, height);
743
geometry =
Utility
.Intersect(geometry, clip, Matrix.Identity, out empty);
840
if (!
Utility
.IsRenderVisible(clip.Bounds))
855
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);
1144
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))
298
opacity =
Utility
.NormalizeOpacity(opacity);
300
if (!
Utility
.IsValid(transform))
318
_clip =
Utility
.Intersect(_clip, clip, Matrix.Identity, out empty);
342
_clip =
Utility
.TransformGeometry(_clip, invertTransform); // transform inherited clip to this level
347
c.Clip =
Utility
.Intersect(clip, _clip, Matrix.Identity, out empty); // Combined with inherited attributes
359
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);
329
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))
417
DrawingBrush db =
Utility
.CreateNonInheritingDrawingBrush(di.Drawing);
455
if (
Utility
.IsRenderVisible(dg))
492
BitmapSource bitmap =
Utility
.RasterizeDrawing(
520
primitive.Opacity =
Utility
.NormalizeOpacity(dg.Opacity);
573
if (!
Utility
.IsOpaque(opacity))
601
Opacity *=
Utility
.NormalizeOpacity(sb.Color.ScA) * OpacityMask.Opacity;
798
if ((drawingBrush == null) || !
Utility
.IsIdentity(drawingBrush.Transform))
840
brushGeometry =
Utility
.TransformGeometry(worldGeometry, worldToBrushTransform);
875
Matrix viewboxToViewportTransform =
Utility
.CreateViewboxToViewportTransform(
885
gdiRasterizeCost *=
Utility
.TransparencyCostFactor;
930
viewboxToViewportTransform =
Utility
.CreateViewboxToViewportTransform(
1051
double scale =
Utility
.GetScale(Transform);
1086
if (!
Utility
.IsOpaque(Opacity) || (OpacityMask != null))
1129
Geometry =
Utility
.Intersect(Geometry, Clip, Matrix.Identity, out empty);
1164
Geometry g =
Utility
.TransformGeometry(WidenGeometry, Transform);
1177
Geometry =
Utility
.Exclude(Geometry,
Utility
.InverseTransformGeometry(g, Transform), Transform);
1258
if (!
Utility
.IsOpaque(Opacity))
1281
if (
Utility
.IsTransparent(Opacity))
1319
if (
Utility
.HasUniformScale(Transform, out scale))
1331
Geometry =
Utility
.TransformGeometry(Geometry, Transform);
1380
Rect content =
Utility
.GetTileContentBounds(tb);
1391
Matrix viewboxTransform =
Utility
.CreateViewboxToViewportTransform(tb);
1395
Clip =
Utility
.Intersect(Clip, Geometry, Matrix.Identity, out empty);
1409
viewportGeometry.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))
1449
contentGeometry.Transform =
Utility
.MultiplyTransform(tb.Transform, new MatrixTransform(Transform));
1451
Clip =
Utility
.Intersect(Clip, contentGeometry, Matrix.Identity, out empty);
1480
geometryClip =
Utility
.TransformGeometry(geometryClip, inverseTransform);
1484
Geometry =
Utility
.Intersect(Geometry, geometryClip, Matrix.Identity, out empty);
1512
double realOpacity =
Utility
.NormalizeOpacity(realBrush.Opacity);
1531
double realOpacity =
Utility
.NormalizeOpacity(realBrush.Opacity);
1545
if (
Utility
.IsOpaque(opacity) && (opacityMask == null))
1591
Geometry g =
Utility
.TransformGeometry(WidenGeometry, Transform);
1689
Geometry g =
Utility
.TransformGeometry(WidenGeometry, Transform);
1704
if (
Utility
.Covers(g, _bounds))
1715
Clip =
Utility
.Exclude(Clip, g, Matrix.Identity);
1751
bounds =
Utility
.TransformRect(bounds, Transform);
1829
return
Utility
.TransformGeometry(new RectangleGeometry(DstRect), Transform);
1838
Clip =
Utility
.TransformGeometry(new RectangleGeometry(DstRect), Transform);
1841
Clip =
Utility
.Exclude(Clip, g, Matrix.Identity);
1911
if (
Utility
.IsTransparent(Opacity))
1926
Geometry dest =
Utility
.TransformGeometry(new RectangleGeometry(DstRect), Transform);
1928
if (
Utility
.Covers(Clip, dest)) // If dest is inside clipping region, ignore clipping
1958
return
Utility
.TransformRect(DstRect, Transform);
2069
if (
Utility
.IsTransparent(Opacity))
2111
return
Utility
.TransformRect(bounds, Transform);
2201
if (!
Utility
.FullyCovers(primitive.Clip, pshape))
2207
return
Utility
.FullyCovers(primitive.GetShapeGeometry(), pshape);
AlphaFlattener\PrimitiveList.cs (3)
256
bool skip = !
Utility
.IsRenderVisible(info.bounds) ||
Utility
.Disjoint(p.Clip, info.bounds);
272
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);
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)
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);
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)
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))