7 instantiations of BrushProxy
ReachFramework (7)
AlphaFlattener\BrushProxy.cs (7)
914BrushProxy rslt = new BrushProxy(); 2153b._opacityMask = new BrushProxy(); 2165BrushProxy list = new BrushProxy(); 2599static private BrushProxy _blackBrush = new BrushProxy(Brushes.Black); 2600static private BrushProxy _whiteBrush = new BrushProxy(Brushes.White); 2672BrushProxy brushProxy = new BrushProxy(brush); 3512s_EmptyBrush = new BrushProxy(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)));
208 references to BrushProxy
ReachFramework (208)
AlphaFlattener\BrushProxy.cs (93)
161private PenProxy(Pen pen, BrushProxy brush) 211public BrushProxy StrokeBrush 236public void PushOpacity(double opacity, BrushProxy opacityMask) 238if ((_brush.Brush != null) && (BrushProxy.IsOpaqueWhite(_brush.Brush) || BrushProxy.IsOpaqueBlack(_brush.Brush))) 277BrushProxy brush = BrushProxy.CreateBrush(pen.Brush, bounds); 310BrushProxy brush = BrushProxy.CreateUserBrush(pen.Brush, bounds, brushToWorldTransformHint, treeWalkProgress); 344private BrushProxy _brush; // Brush within the pen, may change 528public void AddTo(BrushProxy bp) 547foreach (BrushProxy b in _brushList) 554public BrushProxy Clone() 556return MemberwiseClone() as BrushProxy; 559public BrushProxy PushOpacity(double opacity, BrushProxy opacityMask) 565_opacityMask = BrushProxy.BlendBrush(_opacityMask, opacityMask); 570BrushProxy om = _opacityMask; 575BrushProxy result = this.BlendBrush(om); 681return (_brushList[0] as BrushProxy).IsOpaque(); 806foreach (BrushProxy brush in _brushList) 816public BrushProxy ApplyTransformCopy(Matrix trans) 818BrushProxy result = this; 835public BrushProxy BlendBrush(BrushProxy brushB) 871BrushProxy bp = BlendImageBrush(brushB, true); 882BrushProxy bp = brushB.BlendImageBrush(this, false); 891BrushProxy p = BlendLinearGradientBrush(brushB); 914BrushProxy rslt = new BrushProxy(); 930foreach (BrushProxy b in this.BrushList) 1052foreach (BrushProxy b in _brushList) 1104foreach (BrushProxy brush in _brushList) 1271foreach (BrushProxy b in _brushList) 1393foreach (BrushProxy child in _brushList) 1457foreach (BrushProxy child in _brushList) 1551foreach (BrushProxy child in _brushList) 1760private BrushProxy BlendImage(Color color, bool pre) 1778BrushProxy proxy = BrushProxy.CreateBrush(ib, _bounds); 1783private BrushProxy BlendDrawingBrush(Color color, bool after) 1794BrushProxy b = this.Clone(); 1797b._drawing = drawing.BlendOpacityMaskWithColor(BrushProxy.CreateColorBrush(color)); 1816private BrushProxy BlendTileBrush(Color color, bool pre) 1835private BrushProxy BlendComplexColor(Color color, bool pre) 1837BrushProxy b = this.Clone(); 1966private BrushProxy BlendGradient(Color color, bool pre, ColorInterpolationMode interpolationMode) 2117BrushProxy bp = BrushProxy.CreateBrush(g, _bounds); 2128private BrushProxy BlendBrushList(BrushProxy b, bool first) 2145b = b.BlendBrush(_brushList[0] as BrushProxy); 2149b._opacityMask = _brushList[1] as BrushProxy; 2157(_brushList[i] as BrushProxy).AddTo(b._opacityMask); 2165BrushProxy list = new BrushProxy(); 2167foreach (BrushProxy bp in _brushList) 2310private BrushProxy BlendImageBrush(BrushProxy brushB, bool pre) 2369BrushProxy bp = BrushProxy.CreateBrush(ibnew, _bounds); 2452private BrushProxy BlendLinearGradientBrush(BrushProxy brushB) 2521BrushProxy bp = this.Clone(); 2541private BrushProxy BlendRadialGradientBrush(BrushProxy brushB) 2580BrushProxy bp = this.Clone(); 2599static private BrushProxy _blackBrush = new BrushProxy(Brushes.Black); 2600static private BrushProxy _whiteBrush = new BrushProxy(Brushes.White); 2646private static BrushProxy CreateBrushCore(Brush brush, Rect bounds) 2672BrushProxy brushProxy = new BrushProxy(brush); 2712public static BrushProxy CreateColorBrush(Color color) 2730public static BrushProxy CreateBrush(Brush brush, Rect bounds) 2748public static BrushProxy CreateOpacityMaskBrush(Brush brush, Rect bounds) 2756BrushProxy result = CreateBrushCore(brush, bounds); 2778public static BrushProxy CreateUserBrush(Brush brush, Rect bounds, Matrix brushToWorldTransformHint, TreeWalkProgress treeWalkProgress) 3209public static BrushProxy BlendBrush(BrushProxy one, BrushProxy two) 3224public static BrushProxy BlendColorWithBrush(bool opacityOnly, Color colorA, BrushProxy brushB, bool reverse) 3233BrushProxy b = brushB.Clone(); 3244return brushB.BlendBrush(BrushProxy.CreateColorBrush(colorA)); 3248return BrushProxy.CreateColorBrush(colorA).BlendBrush(brushB); 3255return brushB.BlendBrushList(BrushProxy.CreateColorBrush(colorA), !reverse); 3264return BrushProxy.CreateColorBrush(colorA); 3273return BrushProxy.CreateColorBrush(colorA); 3289return BrushProxy.CreateColorBrush( 3298return BrushProxy.CreateColorBrush( 3376public BrushProxy OpacityMask 3506static public BrushProxy EmptyBrush 3526private BrushProxy _opacityMask; 3556static private BrushProxy s_EmptyBrush; 3565public FillVisual(BrushProxy brush, Matrix mat, int width, int height) : base() 3582BrushProxy mask = brush.OpacityMask;
AlphaFlattener\DrawingContext.cs (47)
23private BrushProxy _opacityMask; 37BrushProxy opacityMask, 56void IProxyDrawingContext.Push(double opacity, BrushProxy opacityMask) 62_opacityMask = BrushProxy.BlendBrush(_opacityMask, opacityMask); 67_opacityMask = (BrushProxy)_pushedStack.Pop(); 71void IProxyDrawingContext.DrawGeometry(BrushProxy brush, PenProxy pen, Geometry geometry, Geometry clip, Matrix brushTrans, ProxyDrawingFlags flags) 166bool IProxyDrawingContext.DrawGlyphs(GlyphRun glyphrun, Geometry clip, Matrix trans, BrushProxy foreground) 229private bool LinearFillGeometry(BrushProxy linear, BrushProxy other, bool pre, ArrayList brushes, int from, Geometry shape) 238BrushProxy saveMask = linear.OpacityMask; 281BrushProxy blend; 300blend = BrushProxy.BlendColorWithBrush(false, color, other, !pre); 304blend = BrushProxy.BlendColorWithBrush(false, color, saveMask, false); 353private bool RadialFillGeometry(BrushProxy radial, BrushProxy other, bool pre, ArrayList brushes, int from, Geometry shape) 361BrushProxy saveMask = radial.OpacityMask; 406BrushProxy blend = null; 425blend = BrushProxy.BlendColorWithBrush(false, color, other, !pre); 429blend = BrushProxy.BlendColorWithBrush(false, color, saveMask, false); 474private bool FillGeometry(BrushProxy one, ArrayList brushes, int from, Geometry geometry) 478BrushProxy two = null; 489two = brushes[from] as BrushProxy; 497two = one.BrushList[1] as BrushProxy; 498one = one.BrushList[0] as BrushProxy; 501BrushProxy.BrushTypes typeOne = one.BrushType; 502BrushProxy.BrushTypes typeTwo = two.BrushType; 512BrushProxy t = one; one = two; two = t; 514BrushProxy.BrushTypes bt = typeOne; typeOne = typeTwo; typeTwo = bt; 519if ((typeOne & BrushProxy.BrushTypes.RadialGradientBrush) != 0) 524if ((typeOne & BrushProxy.BrushTypes.LinearGradientBrush) != 0) 529if ((typeOne & BrushProxy.BrushTypes.HasOpacityMask) != 0) 531BrushProxy.BrushTypes opacityType = one.OpacityMask.BrushType; 533if ((opacityType & BrushProxy.BrushTypes.RadialGradientBrush) != 0) 538if ((opacityType & BrushProxy.BrushTypes.LinearGradientBrush) != 0) 561private bool BetterRasterize(BrushProxy brush, Geometry shape) 578bool rslt = FillGeometry(brush.BrushList[0] as BrushProxy, brush.BrushList, 1, shape); 595private void RasterizeGeometry(BrushProxy brush, Geometry shape) 678void IProxyDrawingContext.Push(double opacity, BrushProxy opacityMask) 690void IProxyDrawingContext.DrawGeometry(BrushProxy brush, PenProxy pen, Geometry geometry, Geometry clip, Matrix brushTrans, ProxyDrawingFlags flags) 706brush = BrushProxy.BlendColorWithBrush(false, Colors.White, brush, false); 725FillGeometry(brush.BrushList[0] as BrushProxy, brush.BrushList, 1, geometry); 733rasterize = ! FillGeometry(brush.BrushList[0] as BrushProxy, brush.BrushList, 1, geometry); 757BrushProxy strokeBrush = null; 766strokeBrush = BrushProxy.BlendColorWithBrush(false, Colors.White, strokeBrush, false); 927bool IProxyDrawingContext.DrawGlyphs(GlyphRun glyphrun, Geometry clip, Matrix trans, BrushProxy foreground) 931BrushProxy bp = BrushProxy.BlendColorWithBrush(false, Colors.White, foreground, false);
AlphaFlattener\Flattener.cs (8)
78public void TreeFlatten(Primitive tree, Geometry clip, Matrix transform, double opacity, BrushProxy opacityMask) 114opacityMask = BrushProxy.BlendBrush(opacityMask, tree.OpacityMask); 517BrushProxy bi = gi.Brush.ApplyTransformCopy(gi.Transform); 518BrushProxy bj = gj.Brush.ApplyTransformCopy(gj.Transform); 676BrushProxy under = BrushProxy.CreateColorBrush(Colors.White); 691BrushProxy blendedBrush = gp.Brush; 692BrushProxy blendedPenBrush = gp.Pen?.StrokeBrush;
AlphaFlattener\ImageProxy.cs (4)
153public void PushOpacity(double opacity, BrushProxy opacityMask, Rect rect, Matrix trans) 258public void BlendUnderBrush(bool opacityOnly, BrushProxy brush, Matrix trans) 282private Byte[] RasterizeBrush(BrushProxy brush, Matrix trans) 293public void BlendOverBrush(bool opacityOnly, BrushProxy brush, Matrix trans)
AlphaFlattener\Interfaces.cs (3)
103void Push(double opacity, BrushProxy opacityMask); 107void DrawGeometry(BrushProxy brush, PenProxy pen, Geometry geometry, Geometry clip, Matrix brushTrans, ProxyDrawingFlags flags); 111bool DrawGlyphs(GlyphRun glyphrun, Geometry clip, Matrix trans, BrushProxy foreground);
AlphaFlattener\MetroDevice.cs (6)
42private BrushProxy _opacityMask; // Current layer OpacityMask 213g.Brush = BrushProxy.CreateBrush(brush, bounds); 231g.OpacityMask = BrushProxy.CreateColorBrush(Colors.Transparent); 281g.Brush = BrushProxy.CreateBrush(foreground, g.GetRectBounds(needBounds)); 366c.OpacityMask = BrushProxy.CreateOpacityMaskBrush(opacityMask, maskBounds); 384_opacityMask = _stack.Pop() as BrushProxy;
AlphaFlattener\Optimizer.cs (1)
335BrushProxy bp = gp.Brush;
AlphaFlattener\Primitive.cs (33)
32private BrushProxy _opacityMask; 76public abstract BrushProxy BlendBrush(BrushProxy brush); 85public abstract Primitive BlendOpacityMaskWithColor(BrushProxy color); 123public virtual void PushOpacity(double opacity, BrushProxy opacityMask) 266public BrushProxy OpacityMask 337gp.Brush = BrushProxy.CreateUserBrush(gd.Brush, bounds, drawingToWorldTransformHint, new TreeWalkProgress()); 393Brush = BrushProxy.CreateUserBrush( 420BrushProxy bp = BrushProxy.CreateBrush(db, id.Rect); 430Brush = BrushProxy.CreateBrush(db, id.Rect), 527primitive.OpacityMask = BrushProxy.CreateOpacityMaskBrush(dg.OpacityMask, dg.Bounds); 653private BrushProxy _brush; 902OpacityMask = BrushProxy.BlendBrush(OpacityMask, _brush.OpacityMask), 1009public BrushProxy Brush 1182public override BrushProxy BlendBrush(BrushProxy brushA) 1184BrushProxy b = Brush; 1203BrushProxy b = Brush; 1220public override Primitive BlendOpacityMaskWithColor(BrushProxy color) 1547public override void PushOpacity(double opacity, BrushProxy opacityMask) 1554OpacityMask = BrushProxy.BlendBrush(OpacityMask, opacityMask); 1854public override BrushProxy BlendBrush(BrushProxy brush) 1877BrushProxy b = BrushProxy.CreateBrush(brush, DstRect); 1882public override Primitive BlendOpacityMaskWithColor(BrushProxy color) 1942public override void PushOpacity(double opacity, BrushProxy opacityMask) 1944OpacityMask = BrushProxy.BlendBrush(OpacityMask, opacityMask); 2036public override BrushProxy BlendBrush(BrushProxy brush) 2048public override Primitive BlendOpacityMaskWithColor(BrushProxy color) 2198BrushProxy bp = gp.Brush;
AlphaFlattener\PrimitiveRenderer.cs (3)
150public BrushProxy Brush 510BrushProxy oldbrush = _brush; 547private BrushProxy _brush; // primitive brush, possibly in world space
AlphaFlattener\Utility.cs (3)
1479BrushProxy bp = BrushProxy.CreateBrush(ib, maskBounds); 2131if (BrushProxy.IsEmpty(drawing.OpacityMask))
Serialization\DrawingContextFlattener.cs (2)
90Debug.Assert(!BrushProxy.IsEmpty(opacityMask), "empty opacity mask should not result in Push"); 211return BrushProxy.ReduceBrush(brush, bounds, Transform, _pageSize, _treeWalkProgress);
Serialization\VisualSerializer.cs (4)
256Debug.Assert(!BrushProxy.IsEmpty(brush), "Should not be serializing empty brush"); 1149if (!BrushProxy.IsEmpty(brush)) 1157if ((pen.Brush != null) && !BrushProxy.IsEmpty(pen.Brush)) 2261if (opacityMask != null && !BrushProxy.IsEmpty(opacityMask))
Serialization\VisualTreeFlattener.cs (1)
475if (effect == null && (Utility.IsTransparent(opacity) || BrushProxy.IsEmpty(mask)))