341 references to Utility
ReachFramework (341)
AlphaFlattener\BrushProxy.cs (147)
234
if (!
Utility
.AreClose(ratio, 1.0))
371
_opacity =
Utility
.NormalizeOpacity(brush.Opacity);
415
if (! (_brush is SolidColorBrush) && !
Utility
.IsIdentity(_brush.RelativeTransform))
420
Matrix mat =
Utility
.MergeTransform(_brush.Transform, _brush.RelativeTransform, bounds);
441
Rect viewport =
Utility
.GetTileAbsoluteViewport(tb, bounds);
443
if (!
Utility
.IsRenderVisible(viewport))
465
Rect viewbox =
Utility
.GetTileAbsoluteViewbox(tb);
467
if (!
Utility
.IsValidViewbox(viewbox, tb.Stretch != Stretch.None))
492
lb.StartPoint =
Utility
.MapPoint(bounds, lb.StartPoint);
493
lb.EndPoint =
Utility
.MapPoint(bounds, lb.EndPoint);
513
rb.Center =
Utility
.MapPoint(bounds, rb.Center);
514
rb.GradientOrigin =
Utility
.MapPoint(bounds, rb.GradientOrigin);
565
_opacity *=
Utility
.NormalizeOpacity(opacity);
603
if (!
Utility
.IsOpaque(_opacity))
612
return
Utility
.IsOpaque(y.Color.ScA);
621
if (!
Utility
.IsOpaque(gs.Color.ScA))
672
Debug.Assert(
Utility
.IsRenderVisible(vb), "TileBrush.Viewbox area must be positive");
701
double opacity = _opacity *
Utility
.NormalizeOpacity(y.Color.ScA);
703
return
Utility
.IsTransparent(opacity);
712
double opacity = _opacity *
Utility
.NormalizeOpacity(gs.Color.ScA);
714
if (!
Utility
.IsTransparent(opacity))
725
if (
Utility
.IsTransparent(_opacity))
739
Debug.Assert(
Utility
.IsRenderVisible(vb), "TileBrush.Viewbox must be visible");
743
Matrix viewboxToViewportTransformHint =
Utility
.CreateViewboxToViewportTransform(db);
753
if (
Utility
.IsTransparent(_opacity))
865
return BlendColorWithBrush(_opacityOnly,
Utility
.Scale(sA.Color, _opacity), brushB, false);
872
return BlendColorWithBrush(brushB._opacityOnly,
Utility
.Scale(sB.Color, brushB._opacity), this, true);
1035
else if (!
Utility
.IsOpaque(_opacity))
1038
if (_opacity !=
Utility
.GetOpacity(_brush))
1101
if (
Utility
.IsTransparent(_opacity))
1121
if (isOpaque && (_brush.Transform == null ||
Utility
.IsScaleTranslate(_brush.Transform.Value)))
1130
Utility
.AreClose(linearBrush.StartPoint.X, linearBrush.EndPoint.X) ? 1 : size.Width,
1131
Utility
.AreClose(linearBrush.StartPoint.Y, linearBrush.EndPoint.Y) ? 1 : size.Height
1146
cost *=
Utility
.TransparencyCostFactor;
1207
if (!
Utility
.AreClose(bounds, viewport))
1259
Matrix viewboxToViewportTransformHint =
Utility
.CreateViewboxToViewportTransform(drawingBrush);
1340
DrawingBrush newBrush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
1417
DrawingBrush brush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
1452
if (!
Utility
.IsTransparent(_beforeDrawing.ScA))
1469
if (!
Utility
.IsTransparent(_afterDrawing.ScA))
1507
if (!
Utility
.IsTransparent(_beforeDrawing.ScA) || !
Utility
.IsTransparent(_afterDrawing.ScA) || _brushList == null)
1523
if (!
Utility
.IsTransparent(_beforeDrawing.ScA))
1534
if (_brushList == null && !
Utility
.IsTransparent(_brush.Opacity))
1541
if (!
Utility
.IsOpaque(inheritedOpacity))
1551
if (!
Utility
.IsOpaque(_opacity))
1588
if (!
Utility
.IsTransparent(_afterDrawing.ScA))
1612
if (!
Utility
.IsOpaque(p.Opacity))
1638
Geometry shape =
Utility
.TransformGeometry(p.GetShapeGeometry(), transform);
1640
shape =
Utility
.Exclude(viewbox, shape, p.Transform);
1677
if (
Utility
.IsTransparent(p.Opacity))
1707
Geometry shape =
Utility
.TransformGeometry(p.GetShapeGeometry(), drawingToWorldTransformHint);
1711
shape =
Utility
.Intersect(viewbox, shape, Matrix.Identity, out empty);
1718
if (!
Utility
.IsRenderVisible(shape.Bounds))
1741
Rect content =
Utility
.GetTileContentBounds(brush);
1746
Matrix viewboxToViewportTransform =
Utility
.CreateViewboxToViewportTransform(brush);
1847
b._afterDrawing =
Utility
.BlendColor(b._afterDrawing, color);
1851
b._beforeDrawing =
Utility
.BlendColor(color, b._beforeDrawing);
1870
result =
Utility
.Scale(color,
Utility
.NormalizeOpacity(stopColor.ScA) * _opacity);
1876
result =
Utility
.BlendColor(
Utility
.Scale(stopColor, _opacity), color);
1880
result =
Utility
.BlendColor(color,
Utility
.Scale(stopColor, _opacity));
1994
bool colorOpaque =
Utility
.IsOpaque(color.ScA);
2051
Color prevColor =
Utility
.NormalizeColor(prevStop.Color);
2063
currentColor =
Utility
.NormalizeColor(currentStop.Color);
2219
if (
Utility
.IsScaleTranslate(B2A))
2256
if (
Utility
.IsMultipleOf(viewportA.Width, width) &&
2257
Utility
.IsMultipleOf(viewportA.Height, height))
2285
if (
Utility
.IsZero(start.X - end.X))
2289
if (
Utility
.IsMultipleOf(viewportA.Height, height))
2294
else if (
Utility
.IsZero(start.Y - end.Y))
2298
if (
Utility
.IsMultipleOf(viewportA.Width, width))
2413
if ((gsA == null) || (gsB == null) || !
Utility
.IsZero(gsA.Offset - gsB.Offset))
2432
gs.Color =
Utility
.Scale(gsA.Color, gsB.Color.ScA);
2436
gs.Color =
Utility
.Scale(gsB.Color, gsA.Color.ScA);
2440
gs.Color =
Utility
.BlendColor(gsA.Color, gsB.Color);
2488
if (!
Utility
.IsZero(dxA - dxB) || !
Utility
.IsZero(dyA - dyB))
2518
if ((
Utility
.IsZero(dX) ||
Utility
.IsMultipleOf(dX, dxA * factor)) &&
2519
(
Utility
.IsZero(dY) ||
Utility
.IsMultipleOf(dY, dyA * factor)))
2565
if (!
Utility
.AreClose(rbA.Center * rbA.Transform.Value, rbB.Center * rbB.Transform.Value))
2571
if (!
Utility
.AreClose(rbA.GradientOrigin * rbA.Transform.Value, rbB.GradientOrigin * rbB.Transform.Value))
2577
if (
Utility
.AreClose(new Vector(Math.Abs(rbA.RadiusX), Math.Abs(rbA.RadiusY)) * rbA.Transform.Value,
2611
if ((sb != null) &&
Utility
.IsOpaque(sb.Opacity))
2628
if ((sb != null) &&
Utility
.IsOpaque(sb.Opacity))
2719
if (
Utility
.IsTransparent(color.ScA))
2820
if (
Utility
.IsTransparent(brush.Opacity))
2825
if (brush.Transform != null && !
Utility
.IsValid(brush.Transform.Value))
2835
if (
Utility
.IsTransparent(solidBrush.Color.ScA))
2858
if (!
Utility
.IsValid(stop.Offset))
2869
if (!
Utility
.IsRenderVisible(linearBrush.StartPoint) || !
Utility
.IsRenderVisible(linearBrush.EndPoint))
2882
if (!
Utility
.IsRenderVisible(radialBrush.Center) ||
2883
!
Utility
.IsRenderVisible(radialBrush.GradientOrigin) ||
2884
!
Utility
.IsRenderVisible(radialBrush.RadiusX) ||
2885
!
Utility
.IsRenderVisible(radialBrush.RadiusY))
2902
if (!
Utility
.IsRenderVisible(tileBrush.Viewport) ||
2903
!
Utility
.IsValidViewbox(tileBrush.Viewbox, tileBrush.Stretch != Stretch.None)
2909
Rect contentBounds =
Utility
.GetTileContentBounds(tileBrush);
2911
if (!
Utility
.IsRenderVisible(contentBounds))
2940
double opacity =
Utility
.NormalizeOpacity(brush.Opacity);
2958
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);
3136
Transform visualTransform =
Utility
.GetVisualTransform(vb.Visual);
3148
DrawingBrush drawingBrush =
Utility
.CreateNonInheritingDrawingBrush(drawing);
3185
DrawingBrush db =
Utility
.CreateNonInheritingDrawingBrush(drawingImage.Drawing);
3230
if (
Utility
.IsOpaque(colorA.ScA))
3264
if (
Utility
.IsOpaque(colorA.ScA))
3292
Utility
.Scale(
3294
Utility
.NormalizeOpacity(sB.Color.ScA) * brushB._opacity
3301
Utility
.BlendColor(
3303
Utility
.Scale(
3373
Debug.Assert(
Utility
.NormalizeOpacity(value) == value, "BrushProxy.Opacity must always be normalized");
3647
Utility
.IsValid(a) &&
Utility
.IsValid(r) &&
Utility
.IsValid(g) &&
Utility
.IsValid(b),
3661
c =
Utility
.NormalizeColor(c);
3689
return Color.FromArgb(
Utility
.OpacityToByte(m_a),
Utility
.ColorToByte(m_r),
Utility
.ColorToByte(m_g),
Utility
.ColorToByte(m_b));
3713
Debug.Assert(
Utility
.IsValid(opacity), "Opacity comes from BrushProxy, should be valid");
3914
if ((
Utility
.AreClose(offset, _offset[k])) &&
3915
Utility
.AreClose(offset, _offset[k + 1]))
4004
if (!
Utility
.IsRenderVisible(brush.StartPoint) ||
4005
!
Utility
.IsRenderVisible(brush.EndPoint) ||
4006
!
Utility
.IsValid(brushToWorldTransform))
4027
Geometry xgeometry =
Utility
.TransformGeometry(geometry, worldToXTransform);
4040
double xToWorldScale =
Utility
.GetScale(brushToWorldTransform);
4138
if (
Utility
.IsZero(gradientVector.X) &&
Utility
.IsZero(gradientVector.Y))
4182
Debug.Assert(
Utility
.IsValid(opacity), "Opacity comes from BrushProxy, should be valid");
4197
if (!
Utility
.IsRenderVisible(_x0) ||
4198
!
Utility
.IsRenderVisible(_y0) ||
4199
!
Utility
.IsRenderVisible(_u0) ||
4200
!
Utility
.IsRenderVisible(_v0) ||
4201
!
Utility
.IsRenderVisible(_rx) ||
4202
!
Utility
.IsRenderVisible(_ry))
4214
shape =
Utility
.TransformGeometry(shape, mat);
4297
bool simple =
Utility
.IsScaleTranslate(_trans);
AlphaFlattener\DrawingContext.cs (15)
87
clip =
Utility
.Intersect(_clip,
Utility
.TransformGeometry(clip, _transform), Matrix.Identity, out empty);
108
bool uniform =
Utility
.HasUniformScale(brushTrans, out scale);
119
geometry =
Utility
.InverseTransformGeometry(geometry, brushTrans);
121
geometry =
Utility
.TransformGeometry(geometry, brushTrans);
150
clip =
Utility
.Intersect(_clip,
Utility
.TransformGeometry(clip, _transform), Matrix.Identity, out empty);
174
clip =
Utility
.Intersect(_clip,
Utility
.TransformGeometry(clip, _transform), Matrix.Identity, out empty);
288
linear.Opacity = saveOpacity *
Utility
.NormalizeOpacity(color.ScA);
413
radial.Opacity = saveOpacity *
Utility
.NormalizeOpacity(color.ScA);
611
Matrix mat =
Utility
.CreateMappingTransform(bounds, width, height);
747
geometry =
Utility
.Intersect(geometry, clip, Matrix.Identity, out empty);
844
if (!
Utility
.IsRenderVisible(clip.Bounds))
859
Geometry imageClip =
Utility
.TransformGeometry(clip, imageTransform);
AlphaFlattener\Flattener.cs (11)
92
Debug.Assert(
Utility
.IsValid(opacity) &&
Utility
.IsValid(tree.Opacity), "Invalid opacity encountered, should've been normalized in conversion to Primitive");
123
if (
Utility
.IsTransparent(opacity))
130
Geometry transclip =
Utility
.TransformGeometry(tree.Clip, transform);
134
clip =
Utility
.Intersect(clip, transclip, Matrix.Identity, out empty);
151
(
Utility
.IsOpaque(opacity) && (opacityMask == null))) // For opaque subtree, just push trasform/clip into it.
208
(!gp.IsOpaque || !
Utility
.IsOpaque(opacity)))
239
Geometry transclip =
Utility
.TransformGeometry(tree.Clip, transform);
243
tree.Clip =
Utility
.Intersect(transclip, clip, Matrix.Identity, out empty);
247
empty =
Utility
.IsEmpty(tree.Clip, Matrix.Identity);
1149
g =
Utility
.TransformGeometry(g, p.Transform);
AlphaFlattener\ImageProxy.cs (12)
213
int op =
Utility
.OpacityToByte(opacity);
246
Utility
.BlendUnderColor(_pixels, _pixelWidth * _pixelHeight, color, opacity, opacityOnly);
251
if (opacityOnly || !
Utility
.IsOpaque(opacity) || !IsOpaque())
256
Utility
.BlendOverColor(_pixels, _pixelWidth * _pixelHeight, color, opacity, opacityOnly);
272
BlendUnderColor(
Utility
.Scale(sb.Color, brush.Opacity), 1, opacityOnly);
280
Utility
.BlendPixels(_pixels, opacityOnly, brushPixels, brush.OpacityOnly, _pixelWidth * _pixelHeight, _pixels);
313
BlendOverColor(
Utility
.Scale(sb.Color, brush.Opacity), 1.0, opacityOnly);
321
Utility
.BlendPixels(brushPixels, brush.OpacityOnly, _pixels, opacityOnly, _pixelWidth * _pixelHeight, _pixels);
344
if (!
Utility
.IsOpaque(c.ScA))
460
if (
Utility
.IsZero(dpiScaleX))
462
if (
Utility
.IsZero(dpiScaleY))
508
pixels =
Utility
.ClipPixels(_pixels, _pixelWidth, _pixelHeight, x0, y0, width, height);
AlphaFlattener\MetroDevice.cs (7)
152
if (
Utility
.IsTransparent(_opacity) || ((brush == null) && (pen == null || pen.Brush == null)) || (geometry == null))
304
opacity =
Utility
.NormalizeOpacity(opacity);
306
if (!
Utility
.IsValid(transform))
324
_clip =
Utility
.Intersect(_clip, clip, Matrix.Identity, out empty);
348
_clip =
Utility
.TransformGeometry(_clip, invertTransform); // transform inherited clip to this level
353
c.Clip =
Utility
.Intersect(clip, _clip, Matrix.Identity, out empty); // Combined with inherited attributes
365
if (
Utility
.ExtractOpacityMaskOpacity(opacityMask, out op, maskBounds))
AlphaFlattener\Optimizer.cs (3)
56
Matrix mat =
Utility
.CreateMappingTransform(m_bounds, width, height);
80
Geometry geometry =
Utility
.Intersect(primitive.GetShapeGeometry(), primitive.Clip, Matrix.Identity, out empty);
333
complexity =
Utility
.GetGeometryPointCount(geo);
AlphaFlattener\Primitive.cs (57)
174
shape =
Utility
.Intersect(shape, Clip, Matrix.Identity, out empty);
197
if (!
Utility
.IsValid(rect))
214
if (
Utility
.IsTransparent(Opacity))
224
if (!
Utility
.IsOpaque(Opacity))
226
factor =
Utility
.TransparencyCostFactor;
266
Debug.Assert(
Utility
.NormalizeOpacity(value) == value, "Opacity should be normalized during tree walking");
321
if (d == null || !
Utility
.IsRenderVisible(d.Bounds))
422
DrawingBrush db =
Utility
.CreateNonInheritingDrawingBrush(di.Drawing);
460
if (
Utility
.IsRenderVisible(dg))
497
BitmapSource bitmap =
Utility
.RasterizeDrawing(
525
primitive.Opacity =
Utility
.NormalizeOpacity(dg.Opacity);
578
if (!
Utility
.IsOpaque(opacity))
606
Opacity *=
Utility
.NormalizeOpacity(sb.Color.ScA) * OpacityMask.Opacity;
803
if ((drawingBrush == null) || !
Utility
.IsIdentity(drawingBrush.Transform))
845
brushGeometry =
Utility
.TransformGeometry(worldGeometry, worldToBrushTransform);
880
Matrix viewboxToViewportTransform =
Utility
.CreateViewboxToViewportTransform(
890
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);
1414
viewportGeometry.Transform =
Utility
.MultiplyTransform(tb.Transform, new MatrixTransform(Transform));
1416
Clip =
Utility
.Intersect(Clip, viewportGeometry, Matrix.Identity, out empty);
1434
if (!empty && tb.Transform != null && !
Utility
.IsScaleTranslate(tb.Transform.Value))
1454
contentGeometry.Transform =
Utility
.MultiplyTransform(tb.Transform, new MatrixTransform(Transform));
1456
Clip =
Utility
.Intersect(Clip, contentGeometry, Matrix.Identity, out empty);
1485
geometryClip =
Utility
.TransformGeometry(geometryClip, inverseTransform);
1489
Geometry =
Utility
.Intersect(Geometry, geometryClip, Matrix.Identity, out empty);
1517
double realOpacity =
Utility
.NormalizeOpacity(realBrush.Opacity);
1536
double realOpacity =
Utility
.NormalizeOpacity(realBrush.Opacity);
1550
if (
Utility
.IsOpaque(opacity) && (opacityMask == null))
1596
Geometry g =
Utility
.TransformGeometry(WidenGeometry, Transform);
1694
Geometry g =
Utility
.TransformGeometry(WidenGeometry, Transform);
1709
if (
Utility
.Covers(g, _bounds))
1720
Clip =
Utility
.Exclude(Clip, g, Matrix.Identity);
1756
bounds =
Utility
.TransformRect(bounds, Transform);
1834
return
Utility
.TransformGeometry(new RectangleGeometry(DstRect), Transform);
1843
Clip =
Utility
.TransformGeometry(new RectangleGeometry(DstRect), Transform);
1846
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)
261
bool skip = !
Utility
.IsRenderVisible(info.bounds) ||
Utility
.Disjoint(p.Clip, info.bounds);
277
if ((p.Clip != null) &&
Utility
.IsRectangle(p.Clip))
AlphaFlattener\PrimitiveRenderer.cs (10)
37
bounds =
Utility
.TransformGeometry(new RectangleGeometry(dest), trans);
125
cur =
Utility
.TransformGeometry(cur, trans);
264
Geometry diff =
Utility
.Exclude(bounds, topBounds, trans);
305
clip =
Utility
.Intersect(clip, bounds, Matrix.Identity, out empty);
364
inter =
Utility
.Intersect(cur, topBounds, Matrix.Identity, out empty);
421
Geometry diff =
Utility
.Exclude(cur, topBounds, Matrix.Identity);
474
Geometry clip =
Utility
.Intersect(inter,
Utility
.TransformGeometry(new RectangleGeometry(ip.DstRect), ip.Transform), ip.Transform, out empty);
479
Geometry clipImageSpace =
Utility
.TransformGeometry(clip, ReverseMap(ip.Transform, ip.DstRect, imageWidth, imageHeight));
533
Geometry geo =
Utility
.Intersect(cur, _clip, Matrix.Identity, out empty);
AlphaFlattener\Utility.cs (16)
1091
return
Utility
.NormalizeOpacity(opacity) > OpaqueEnough;
1100
return
Utility
.NormalizeOpacity(opacity) < AlmostTransparent;
1116
return
Utility
.IsOpaque(sb.Color.ScA);
1197
color =
Utility
.NormalizeColor(color);
1198
opacity =
Utility
.NormalizeOpacity(opacity);
1867
if (!
Utility
.IsRenderVisible(visualBounds))
2130
if (
Utility
.IsTransparent(
Utility
.NormalizeOpacity(drawing.Opacity)))
2136
if (drawing.ClipGeometry != null && !
Utility
.IsRenderVisible(drawing.ClipGeometry.Bounds))
2139
if (drawing.Transform != null && !
Utility
.IsValid(drawing.Transform.Value))
2529
(
Utility
.AreClose(point.X, _rect.Left) ||
Utility
.AreClose(point.X, _rect.Right)) &&
2530
(
Utility
.AreClose(point.Y, _rect.Top) ||
Utility
.AreClose(point.Y, _rect.Bottom));
2636
bool xzero =
Utility
.IsZero(vector.X);
2637
bool yzero =
Utility
.IsZero(vector.Y);
Serialization\DrawingContextFlattener.cs (9)
91
Debug.Assert(
Utility
.IsValid(opacity), "Invalid opacity should clip subtree");
127
clip =
Utility
.TransformGeometry(clip, Transform);
130
clip =
Utility
.Intersect(clip, Clip, Matrix.Identity, out empty);
376
if (!
Utility
.IsRenderVisible(bounds))
385
clip =
Utility
.TransformGeometry(clip, worldToVisualTransform);
396
if (!
Utility
.IsRenderVisible(bounds))
434
bitmap =
Utility
.RasterizeVisual(
935
opacity =
Utility
.NormalizeOpacity(opacity);
951
if (!
Utility
.IsOpaque(opacity))
Serialization\VisualSerializer.cs (36)
349
Color color =
Utility
.Scale(solidBrush.Color, solidBrush.Opacity);
447
Rect vb =
Utility
.GetTileAbsoluteViewbox(brush);
722
WriteAttr("StartPoint",
Utility
.MapPoint(bounds, lb.StartPoint));
723
WriteAttr("EndPoint",
Utility
.MapPoint(bounds, lb.EndPoint));
756
WriteAttr("Center",
Utility
.MapPoint(bounds, rb.Center));
759
WriteAttr("GradientOrigin",
Utility
.MapPoint(bounds, rb.GradientOrigin));
785
Matrix trans =
Utility
.MergeTransform(db.Transform, db.RelativeTransform, bounds);
790
Matrix drawingToWorldTransform =
Utility
.CreateViewboxToViewportTransform(db, bounds);
979
return
Utility
.IsZero(mat.M11 - mat.M22) &&
980
Utility
.IsZero(mat.M12) &&
981
Utility
.IsZero(mat.M21);
988
if (!
Utility
.IsIdentity(mat))
1202
if ((path.Transform != null) && !
Utility
.IsIdentity(path.Transform))
1375
Matrix mat =
Utility
.MergeTransform(trans, relative, bounds);
1377
if (!
Utility
.IsIdentity(mat))
1385
if (!
Utility
.IsIdentity(trans))
1447
pg =
Utility
.GetAsPathGeometry(geo);
1557
if (!forStroke && !
Utility
.IsRenderVisible(pg.Bounds))
1894
if (!
Utility
.IsRenderVisible(bounds))
1920
bool isLineGeometry =
Utility
.IsLineSegment(geometry);
1965
if (!
Utility
.IsIdentity(trans))
1969
if (
Utility
.IsOne(mat.M11) &&
1970
Utility
.IsOne(mat.M22) &&
1971
Utility
.IsZero(mat.M12) &&
1972
Utility
.IsZero(mat.M21))
2000
BitmapSource bitmap =
Utility
.RasterizeDrawing(
2014
Debug.Assert(
Utility
.IsScaleTranslate(bitmapToDrawingTransform));
2085
Uri uri =
Utility
.GetFontUri(glyphRun.GlyphTypeface);
2259
opacity *=
Utility
.NormalizeOpacity(sb.Color.ScA) *
Utility
.NormalizeOpacity(opacityMask.Opacity);
2264
if (!
Utility
.IsOne(opacity))
2321
if (!
Utility
.IsIdentity(transform))
2329
SetCoordinateFormat(Math.Min(
Utility
.GetScaleX(mat),
Utility
.GetScaleY(mat)));
2360
bool noTrans =
Utility
.IsIdentity(transform);
2371
Utility
.IsOne(opacity) &&
Serialization\VisualTreeFlattener.cs (14)
121
if (Microsoft.Internal.AlphaFlattener.
Utility
.NeedPremultiplyAlpha(value as BitmapSource))
396
if (
Utility
.IsTransparent(dg.Opacity))
401
if ((dg.Transform != null) || (dg.ClipGeometry != null) || (!
Utility
.IsOne(dg.Opacity)))
456
Transform trans =
Utility
.GetVisualTransform(visual);
463
if (trans != null && !
Utility
.IsValid(trans.Value))
469
if (!
Utility
.IsRenderVisible(bounds))
475
if ((clip != null) && !
Utility
.IsRenderVisible(clip.Bounds))
483
if (effect == null && (
Utility
.IsTransparent(opacity) || BrushProxy.IsEmpty(mask)))
490
if ((mask != null) &&
Utility
.IsBrushOpaque(mask))
559
clip =
Utility
.TransformGeometry(clip, clipToWorldSpace);
563
clip =
Utility
.Intersect(inheritedClipping, clip, Matrix.Identity, out empty);
672
if (d == null || !
Utility
.IsRenderVisible(d.Bounds))
714
if (
Utility
.IsRenderVisible(dg))
729
Utility
.NormalizeOpacity(dg.Opacity),
Serialization\XpsImageSerializationService.cs (1)
85
if (Microsoft.Internal.AlphaFlattener.
Utility
.NeedPremultiplyAlpha(bitmapSource))