7 instantiations of BrushProxy
ReachFramework (7)
AlphaFlattener\BrushProxy.cs (7)
917BrushProxy rslt = new BrushProxy(); 2155b._opacityMask = new BrushProxy(); 2167BrushProxy list = new BrushProxy(); 2600static private BrushProxy _blackBrush = new BrushProxy(Brushes.Black); 2601static private BrushProxy _whiteBrush = new BrushProxy(Brushes.White); 2673BrushProxy brushProxy = new BrushProxy(brush); 3511s_EmptyBrush = new BrushProxy(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)));
208 references to BrushProxy
ReachFramework (208)
AlphaFlattener\BrushProxy.cs (93)
162private PenProxy(Pen pen, BrushProxy brush) 212public BrushProxy StrokeBrush 237public void PushOpacity(double opacity, BrushProxy opacityMask) 239if ((_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) 819public BrushProxy ApplyTransformCopy(Matrix trans) 821BrushProxy result = this; 838public BrushProxy BlendBrush(BrushProxy brushB) 874BrushProxy bp = BlendImageBrush(brushB, true); 885BrushProxy bp = brushB.BlendImageBrush(this, false); 894BrushProxy p = BlendLinearGradientBrush(brushB); 917BrushProxy rslt = new BrushProxy(); 933foreach (BrushProxy b in this.BrushList) 1055foreach (BrushProxy b in _brushList) 1107foreach (BrushProxy brush in _brushList) 1274foreach (BrushProxy b in _brushList) 1396foreach (BrushProxy child in _brushList) 1459foreach (BrushProxy child in _brushList) 1553foreach (BrushProxy child in _brushList) 1762private BrushProxy BlendImage(Color color, bool pre) 1780BrushProxy proxy = BrushProxy.CreateBrush(ib, _bounds); 1785private BrushProxy BlendDrawingBrush(Color color, bool after) 1796BrushProxy b = this.Clone(); 1799b._drawing = drawing.BlendOpacityMaskWithColor(BrushProxy.CreateColorBrush(color)); 1818private BrushProxy BlendTileBrush(Color color, bool pre) 1837private BrushProxy BlendComplexColor(Color color, bool pre) 1839BrushProxy b = this.Clone(); 1968private BrushProxy BlendGradient(Color color, bool pre, ColorInterpolationMode interpolationMode) 2119BrushProxy bp = BrushProxy.CreateBrush(g, _bounds); 2130private BrushProxy BlendBrushList(BrushProxy b, bool first) 2147b = b.BlendBrush(_brushList[0] as BrushProxy); 2151b._opacityMask = _brushList[1] as BrushProxy; 2159(_brushList[i] as BrushProxy).AddTo(b._opacityMask); 2167BrushProxy list = new BrushProxy(); 2169foreach (BrushProxy bp in _brushList) 2312private BrushProxy BlendImageBrush(BrushProxy brushB, bool pre) 2371BrushProxy bp = BrushProxy.CreateBrush(ibnew, _bounds); 2453private BrushProxy BlendLinearGradientBrush(BrushProxy brushB) 2522BrushProxy bp = this.Clone(); 2542private BrushProxy BlendRadialGradientBrush(BrushProxy brushB) 2581BrushProxy bp = this.Clone(); 2600static private BrushProxy _blackBrush = new BrushProxy(Brushes.Black); 2601static private BrushProxy _whiteBrush = new BrushProxy(Brushes.White); 2647private static BrushProxy CreateBrushCore(Brush brush, Rect bounds) 2673BrushProxy brushProxy = new BrushProxy(brush); 2713public static BrushProxy CreateColorBrush(Color color) 2731public static BrushProxy CreateBrush(Brush brush, Rect bounds) 2749public static BrushProxy CreateOpacityMaskBrush(Brush brush, Rect bounds) 2757BrushProxy result = CreateBrushCore(brush, bounds); 2779public static BrushProxy CreateUserBrush(Brush brush, Rect bounds, Matrix brushToWorldTransformHint, TreeWalkProgress treeWalkProgress) 3207public static BrushProxy BlendBrush(BrushProxy one, BrushProxy two) 3222public static BrushProxy BlendColorWithBrush(bool opacityOnly, Color colorA, BrushProxy brushB, bool reverse) 3231BrushProxy b = brushB.Clone(); 3242return brushB.BlendBrush(BrushProxy.CreateColorBrush(colorA)); 3246return BrushProxy.CreateColorBrush(colorA).BlendBrush(brushB); 3253return brushB.BlendBrushList(BrushProxy.CreateColorBrush(colorA), !reverse); 3262return BrushProxy.CreateColorBrush(colorA); 3271return BrushProxy.CreateColorBrush(colorA); 3287return BrushProxy.CreateColorBrush( 3296return BrushProxy.CreateColorBrush( 3375public BrushProxy OpacityMask 3505static public BrushProxy EmptyBrush 3525private BrushProxy _opacityMask; 3555static private BrushProxy s_EmptyBrush; 3564public FillVisual(BrushProxy brush, Matrix mat, int width, int height) : base() 3581BrushProxy mask = brush.OpacityMask;
AlphaFlattener\DrawingContext.cs (47)
24private BrushProxy _opacityMask; 38BrushProxy opacityMask, 57void IProxyDrawingContext.Push(double opacity, BrushProxy opacityMask) 63_opacityMask = BrushProxy.BlendBrush(_opacityMask, opacityMask); 68_opacityMask = (BrushProxy)_pushedStack.Pop(); 72void 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) 228private bool LinearFillGeometry(BrushProxy linear, BrushProxy other, bool pre, ArrayList brushes, int from, Geometry shape) 237BrushProxy saveMask = linear.OpacityMask; 280BrushProxy blend; 299blend = BrushProxy.BlendColorWithBrush(false, color, other, !pre); 303blend = BrushProxy.BlendColorWithBrush(false, color, saveMask, false); 352private bool RadialFillGeometry(BrushProxy radial, BrushProxy other, bool pre, ArrayList brushes, int from, Geometry shape) 360BrushProxy saveMask = radial.OpacityMask; 405BrushProxy blend = null; 424blend = BrushProxy.BlendColorWithBrush(false, color, other, !pre); 428blend = BrushProxy.BlendColorWithBrush(false, color, saveMask, false); 473private bool FillGeometry(BrushProxy one, ArrayList brushes, int from, Geometry geometry) 477BrushProxy two = null; 488two = brushes[from] as BrushProxy; 496two = one.BrushList[1] as BrushProxy; 497one = one.BrushList[0] as BrushProxy; 500BrushProxy.BrushTypes typeOne = one.BrushType; 501BrushProxy.BrushTypes typeTwo = two.BrushType; 511BrushProxy t = one; one = two; two = t; 513BrushProxy.BrushTypes bt = typeOne; typeOne = typeTwo; typeTwo = bt; 518if ((typeOne & BrushProxy.BrushTypes.RadialGradientBrush) != 0) 523if ((typeOne & BrushProxy.BrushTypes.LinearGradientBrush) != 0) 528if ((typeOne & BrushProxy.BrushTypes.HasOpacityMask) != 0) 530BrushProxy.BrushTypes opacityType = one.OpacityMask.BrushType; 532if ((opacityType & BrushProxy.BrushTypes.RadialGradientBrush) != 0) 537if ((opacityType & BrushProxy.BrushTypes.LinearGradientBrush) != 0) 560private bool BetterRasterize(BrushProxy brush, Geometry shape) 577bool rslt = FillGeometry(brush.BrushList[0] as BrushProxy, brush.BrushList, 1, shape); 594private void RasterizeGeometry(BrushProxy brush, Geometry shape) 677void IProxyDrawingContext.Push(double opacity, BrushProxy opacityMask) 689void IProxyDrawingContext.DrawGeometry(BrushProxy brush, PenProxy pen, Geometry geometry, Geometry clip, Matrix brushTrans, ProxyDrawingFlags flags) 705brush = BrushProxy.BlendColorWithBrush(false, Colors.White, brush, false); 724FillGeometry(brush.BrushList[0] as BrushProxy, brush.BrushList, 1, geometry); 732rasterize = ! FillGeometry(brush.BrushList[0] as BrushProxy, brush.BrushList, 1, geometry); 756BrushProxy strokeBrush = null; 765strokeBrush = BrushProxy.BlendColorWithBrush(false, Colors.White, strokeBrush, false); 926bool IProxyDrawingContext.DrawGlyphs(GlyphRun glyphrun, Geometry clip, Matrix trans, BrushProxy foreground) 930BrushProxy bp = BrushProxy.BlendColorWithBrush(false, Colors.White, foreground, false);
AlphaFlattener\Flattener.cs (8)
79public void TreeFlatten(Primitive tree, Geometry clip, Matrix transform, double opacity, BrushProxy opacityMask) 115opacityMask = BrushProxy.BlendBrush(opacityMask, tree.OpacityMask); 519BrushProxy bi = gi.Brush.ApplyTransformCopy(gi.Transform); 520BrushProxy bj = gj.Brush.ApplyTransformCopy(gj.Transform); 678BrushProxy under = BrushProxy.CreateColorBrush(Colors.White); 693BrushProxy blendedBrush = gp.Brush; 694BrushProxy blendedPenBrush = gp.Pen == null ? null : gp.Pen.StrokeBrush;
AlphaFlattener\ImageProxy.cs (4)
154public void PushOpacity(double opacity, BrushProxy opacityMask, Rect rect, Matrix trans) 259public void BlendUnderBrush(bool opacityOnly, BrushProxy brush, Matrix trans) 283private Byte[] RasterizeBrush(BrushProxy brush, Matrix trans) 294public void BlendOverBrush(bool opacityOnly, BrushProxy brush, Matrix trans)
AlphaFlattener\Interfaces.cs (3)
104void Push(double opacity, BrushProxy opacityMask); 108void DrawGeometry(BrushProxy brush, PenProxy pen, Geometry geometry, Geometry clip, Matrix brushTrans, ProxyDrawingFlags flags); 112bool DrawGlyphs(GlyphRun glyphrun, Geometry clip, Matrix trans, BrushProxy foreground);
AlphaFlattener\MetroDevice.cs (6)
43private BrushProxy _opacityMask; // Current layer OpacityMask 213g.Brush = BrushProxy.CreateBrush(brush, bounds); 231g.OpacityMask = BrushProxy.CreateColorBrush(Colors.Transparent); 280g.Brush = BrushProxy.CreateBrush(foreground, g.GetRectBounds(needBounds)); 365c.OpacityMask = BrushProxy.CreateOpacityMaskBrush(opacityMask, maskBounds); 383_opacityMask = _stack.Pop() as BrushProxy;
AlphaFlattener\Optimizer.cs (1)
335BrushProxy bp = gp.Brush;
AlphaFlattener\Primitive.cs (33)
33private BrushProxy _opacityMask; 77public abstract BrushProxy BlendBrush(BrushProxy brush); 86public abstract Primitive BlendOpacityMaskWithColor(BrushProxy color); 124public virtual void PushOpacity(double opacity, BrushProxy opacityMask) 267public BrushProxy OpacityMask 338gp.Brush = BrushProxy.CreateUserBrush(gd.Brush, bounds, drawingToWorldTransformHint, new TreeWalkProgress()); 393gp.Brush = BrushProxy.CreateUserBrush( 419BrushProxy bp = BrushProxy.CreateBrush(db, id.Rect); 429gp.Brush = BrushProxy.CreateBrush(db, id.Rect); 524primitive.OpacityMask = BrushProxy.CreateOpacityMaskBrush(dg.OpacityMask, dg.Bounds); 650private BrushProxy _brush; 899canvas.OpacityMask = BrushProxy.BlendBrush(OpacityMask, _brush.OpacityMask); 1005public BrushProxy Brush 1181public override BrushProxy BlendBrush(BrushProxy brushA) 1183BrushProxy b = Brush; 1202BrushProxy b = Brush; 1219public override Primitive BlendOpacityMaskWithColor(BrushProxy color) 1543public override void PushOpacity(double opacity, BrushProxy opacityMask) 1550OpacityMask = BrushProxy.BlendBrush(OpacityMask, opacityMask); 1850public override BrushProxy BlendBrush(BrushProxy brush) 1872BrushProxy b = BrushProxy.CreateBrush(brush, DstRect); 1877public override Primitive BlendOpacityMaskWithColor(BrushProxy color) 1937public override void PushOpacity(double opacity, BrushProxy opacityMask) 1939OpacityMask = BrushProxy.BlendBrush(OpacityMask, opacityMask); 2031public override BrushProxy BlendBrush(BrushProxy brush) 2043public override Primitive BlendOpacityMaskWithColor(BrushProxy color) 2193BrushProxy bp = gp.Brush;
AlphaFlattener\PrimitiveRenderer.cs (3)
151public BrushProxy Brush 511BrushProxy oldbrush = _brush; 548private BrushProxy _brush; // primitive brush, possibly in world space
AlphaFlattener\Utility.cs (3)
1480BrushProxy bp = BrushProxy.CreateBrush(ib, maskBounds); 2131if (BrushProxy.IsEmpty(drawing.OpacityMask))
Serialization\DrawingContextFlattener.cs (2)
91Debug.Assert(!BrushProxy.IsEmpty(opacityMask), "empty opacity mask should not result in Push"); 212return BrushProxy.ReduceBrush(brush, bounds, Transform, _pageSize, _treeWalkProgress);
Serialization\VisualSerializer.cs (4)
257Debug.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)
476if (effect == null && (Utility.IsTransparent(opacity) || BrushProxy.IsEmpty(mask)))