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