7 instantiations of BrushProxy
ReachFramework (7)
AlphaFlattener\BrushProxy.cs (7)
921BrushProxy rslt = new BrushProxy(); 2159b._opacityMask = new BrushProxy(); 2171BrushProxy list = new BrushProxy(); 2604static private BrushProxy _blackBrush = new BrushProxy(Brushes.Black); 2605static private BrushProxy _whiteBrush = new BrushProxy(Brushes.White); 2677BrushProxy brushProxy = new BrushProxy(brush); 3515s_EmptyBrush = new BrushProxy(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)));
208 references to BrushProxy
ReachFramework (208)
AlphaFlattener\BrushProxy.cs (93)
166private PenProxy(Pen pen, BrushProxy brush) 216public BrushProxy StrokeBrush 241public void PushOpacity(double opacity, BrushProxy opacityMask) 243if ((_brush.Brush != null) && (BrushProxy.IsOpaqueWhite(_brush.Brush) || BrushProxy.IsOpaqueBlack(_brush.Brush))) 281BrushProxy brush = BrushProxy.CreateBrush(pen.Brush, bounds); 314BrushProxy brush = BrushProxy.CreateUserBrush(pen.Brush, bounds, brushToWorldTransformHint, treeWalkProgress); 348private BrushProxy _brush; // Brush within the pen, may change 532public void AddTo(BrushProxy bp) 551foreach (BrushProxy b in _brushList) 558public BrushProxy Clone() 560return MemberwiseClone() as BrushProxy; 563public BrushProxy PushOpacity(double opacity, BrushProxy opacityMask) 569_opacityMask = BrushProxy.BlendBrush(_opacityMask, opacityMask); 574BrushProxy om = _opacityMask; 579BrushProxy result = this.BlendBrush(om); 685return (_brushList[0] as BrushProxy).IsOpaque(); 810foreach (BrushProxy brush in _brushList) 823public BrushProxy ApplyTransformCopy(Matrix trans) 825BrushProxy result = this; 842public BrushProxy BlendBrush(BrushProxy brushB) 878BrushProxy bp = BlendImageBrush(brushB, true); 889BrushProxy bp = brushB.BlendImageBrush(this, false); 898BrushProxy p = BlendLinearGradientBrush(brushB); 921BrushProxy rslt = new BrushProxy(); 937foreach (BrushProxy b in this.BrushList) 1059foreach (BrushProxy b in _brushList) 1111foreach (BrushProxy brush in _brushList) 1278foreach (BrushProxy b in _brushList) 1400foreach (BrushProxy child in _brushList) 1463foreach (BrushProxy child in _brushList) 1557foreach (BrushProxy child in _brushList) 1766private BrushProxy BlendImage(Color color, bool pre) 1784BrushProxy proxy = BrushProxy.CreateBrush(ib, _bounds); 1789private BrushProxy BlendDrawingBrush(Color color, bool after) 1800BrushProxy b = this.Clone(); 1803b._drawing = drawing.BlendOpacityMaskWithColor(BrushProxy.CreateColorBrush(color)); 1822private BrushProxy BlendTileBrush(Color color, bool pre) 1841private BrushProxy BlendComplexColor(Color color, bool pre) 1843BrushProxy b = this.Clone(); 1972private BrushProxy BlendGradient(Color color, bool pre, ColorInterpolationMode interpolationMode) 2123BrushProxy bp = BrushProxy.CreateBrush(g, _bounds); 2134private BrushProxy BlendBrushList(BrushProxy b, bool first) 2151b = b.BlendBrush(_brushList[0] as BrushProxy); 2155b._opacityMask = _brushList[1] as BrushProxy; 2163(_brushList[i] as BrushProxy).AddTo(b._opacityMask); 2171BrushProxy list = new BrushProxy(); 2173foreach (BrushProxy bp in _brushList) 2316private BrushProxy BlendImageBrush(BrushProxy brushB, bool pre) 2375BrushProxy bp = BrushProxy.CreateBrush(ibnew, _bounds); 2457private BrushProxy BlendLinearGradientBrush(BrushProxy brushB) 2526BrushProxy bp = this.Clone(); 2546private BrushProxy BlendRadialGradientBrush(BrushProxy brushB) 2585BrushProxy bp = this.Clone(); 2604static private BrushProxy _blackBrush = new BrushProxy(Brushes.Black); 2605static private BrushProxy _whiteBrush = new BrushProxy(Brushes.White); 2651private static BrushProxy CreateBrushCore(Brush brush, Rect bounds) 2677BrushProxy brushProxy = new BrushProxy(brush); 2717public static BrushProxy CreateColorBrush(Color color) 2735public static BrushProxy CreateBrush(Brush brush, Rect bounds) 2753public static BrushProxy CreateOpacityMaskBrush(Brush brush, Rect bounds) 2761BrushProxy result = CreateBrushCore(brush, bounds); 2783public static BrushProxy CreateUserBrush(Brush brush, Rect bounds, Matrix brushToWorldTransformHint, TreeWalkProgress treeWalkProgress) 3211public static BrushProxy BlendBrush(BrushProxy one, BrushProxy two) 3226public static BrushProxy BlendColorWithBrush(bool opacityOnly, Color colorA, BrushProxy brushB, bool reverse) 3235BrushProxy b = brushB.Clone(); 3246return brushB.BlendBrush(BrushProxy.CreateColorBrush(colorA)); 3250return BrushProxy.CreateColorBrush(colorA).BlendBrush(brushB); 3257return brushB.BlendBrushList(BrushProxy.CreateColorBrush(colorA), !reverse); 3266return BrushProxy.CreateColorBrush(colorA); 3275return BrushProxy.CreateColorBrush(colorA); 3291return BrushProxy.CreateColorBrush( 3300return BrushProxy.CreateColorBrush( 3379public BrushProxy OpacityMask 3509static public BrushProxy EmptyBrush 3529private BrushProxy _opacityMask; 3559static private BrushProxy s_EmptyBrush; 3568public FillVisual(BrushProxy brush, Matrix mat, int width, int height) : base() 3585BrushProxy mask = brush.OpacityMask;
AlphaFlattener\DrawingContext.cs (47)
28private BrushProxy _opacityMask; 42BrushProxy opacityMask, 61void IProxyDrawingContext.Push(double opacity, BrushProxy opacityMask) 67_opacityMask = BrushProxy.BlendBrush(_opacityMask, opacityMask); 72_opacityMask = (BrushProxy)_pushedStack.Pop(); 76void IProxyDrawingContext.DrawGeometry(BrushProxy brush, PenProxy pen, Geometry geometry, Geometry clip, Matrix brushTrans, ProxyDrawingFlags flags) 170bool IProxyDrawingContext.DrawGlyphs(GlyphRun glyphrun, Geometry clip, Matrix trans, BrushProxy foreground) 232private bool LinearFillGeometry(BrushProxy linear, BrushProxy other, bool pre, ArrayList brushes, int from, Geometry shape) 241BrushProxy saveMask = linear.OpacityMask; 284BrushProxy blend; 303blend = BrushProxy.BlendColorWithBrush(false, color, other, !pre); 307blend = BrushProxy.BlendColorWithBrush(false, color, saveMask, false); 356private bool RadialFillGeometry(BrushProxy radial, BrushProxy other, bool pre, ArrayList brushes, int from, Geometry shape) 364BrushProxy saveMask = radial.OpacityMask; 409BrushProxy blend = null; 428blend = BrushProxy.BlendColorWithBrush(false, color, other, !pre); 432blend = BrushProxy.BlendColorWithBrush(false, color, saveMask, false); 477private bool FillGeometry(BrushProxy one, ArrayList brushes, int from, Geometry geometry) 481BrushProxy two = null; 492two = brushes[from] as BrushProxy; 500two = one.BrushList[1] as BrushProxy; 501one = one.BrushList[0] as BrushProxy; 504BrushProxy.BrushTypes typeOne = one.BrushType; 505BrushProxy.BrushTypes typeTwo = two.BrushType; 515BrushProxy t = one; one = two; two = t; 517BrushProxy.BrushTypes bt = typeOne; typeOne = typeTwo; typeTwo = bt; 522if ((typeOne & BrushProxy.BrushTypes.RadialGradientBrush) != 0) 527if ((typeOne & BrushProxy.BrushTypes.LinearGradientBrush) != 0) 532if ((typeOne & BrushProxy.BrushTypes.HasOpacityMask) != 0) 534BrushProxy.BrushTypes opacityType = one.OpacityMask.BrushType; 536if ((opacityType & BrushProxy.BrushTypes.RadialGradientBrush) != 0) 541if ((opacityType & BrushProxy.BrushTypes.LinearGradientBrush) != 0) 564private bool BetterRasterize(BrushProxy brush, Geometry shape) 581bool rslt = FillGeometry(brush.BrushList[0] as BrushProxy, brush.BrushList, 1, shape); 598private void RasterizeGeometry(BrushProxy brush, Geometry shape) 681void IProxyDrawingContext.Push(double opacity, BrushProxy opacityMask) 693void IProxyDrawingContext.DrawGeometry(BrushProxy brush, PenProxy pen, Geometry geometry, Geometry clip, Matrix brushTrans, ProxyDrawingFlags flags) 709brush = BrushProxy.BlendColorWithBrush(false, Colors.White, brush, false); 728FillGeometry(brush.BrushList[0] as BrushProxy, brush.BrushList, 1, geometry); 736rasterize = ! FillGeometry(brush.BrushList[0] as BrushProxy, brush.BrushList, 1, geometry); 760BrushProxy strokeBrush = null; 769strokeBrush = BrushProxy.BlendColorWithBrush(false, Colors.White, strokeBrush, false); 930bool IProxyDrawingContext.DrawGlyphs(GlyphRun glyphrun, Geometry clip, Matrix trans, BrushProxy foreground) 934BrushProxy bp = BrushProxy.BlendColorWithBrush(false, Colors.White, foreground, false);
AlphaFlattener\Flattener.cs (8)
84public void TreeFlatten(Primitive tree, Geometry clip, Matrix transform, double opacity, BrushProxy opacityMask) 120opacityMask = BrushProxy.BlendBrush(opacityMask, tree.OpacityMask); 524BrushProxy bi = gi.Brush.ApplyTransformCopy(gi.Transform); 525BrushProxy bj = gj.Brush.ApplyTransformCopy(gj.Transform); 683BrushProxy under = BrushProxy.CreateColorBrush(Colors.White); 698BrushProxy blendedBrush = gp.Brush; 699BrushProxy blendedPenBrush = gp.Pen == null ? null : gp.Pen.StrokeBrush;
AlphaFlattener\ImageProxy.cs (4)
161public void PushOpacity(double opacity, BrushProxy opacityMask, Rect rect, Matrix trans) 266public void BlendUnderBrush(bool opacityOnly, BrushProxy brush, Matrix trans) 290private Byte[] RasterizeBrush(BrushProxy brush, Matrix trans) 301public void BlendOverBrush(bool opacityOnly, BrushProxy brush, Matrix trans)
AlphaFlattener\Interfaces.cs (3)
106void Push(double opacity, BrushProxy opacityMask); 110void DrawGeometry(BrushProxy brush, PenProxy pen, Geometry geometry, Geometry clip, Matrix brushTrans, ProxyDrawingFlags flags); 114bool DrawGlyphs(GlyphRun glyphrun, Geometry clip, Matrix trans, BrushProxy foreground);
AlphaFlattener\MetroDevice.cs (6)
49private BrushProxy _opacityMask; // Current layer OpacityMask 219g.Brush = BrushProxy.CreateBrush(brush, bounds); 237g.OpacityMask = BrushProxy.CreateColorBrush(Colors.Transparent); 286g.Brush = BrushProxy.CreateBrush(foreground, g.GetRectBounds(needBounds)); 371c.OpacityMask = BrushProxy.CreateOpacityMaskBrush(opacityMask, maskBounds); 389_opacityMask = _stack.Pop() as BrushProxy;
AlphaFlattener\Optimizer.cs (1)
339BrushProxy bp = gp.Brush;
AlphaFlattener\Primitive.cs (33)
38private BrushProxy _opacityMask; 82public abstract BrushProxy BlendBrush(BrushProxy brush); 91public abstract Primitive BlendOpacityMaskWithColor(BrushProxy color); 129public virtual void PushOpacity(double opacity, BrushProxy opacityMask) 272public BrushProxy OpacityMask 343gp.Brush = BrushProxy.CreateUserBrush(gd.Brush, bounds, drawingToWorldTransformHint, new TreeWalkProgress()); 398gp.Brush = BrushProxy.CreateUserBrush( 424BrushProxy bp = BrushProxy.CreateBrush(db, id.Rect); 434gp.Brush = BrushProxy.CreateBrush(db, id.Rect); 529primitive.OpacityMask = BrushProxy.CreateOpacityMaskBrush(dg.OpacityMask, dg.Bounds); 655private BrushProxy _brush; 904canvas.OpacityMask = BrushProxy.BlendBrush(OpacityMask, _brush.OpacityMask); 1010public BrushProxy Brush 1186public override BrushProxy BlendBrush(BrushProxy brushA) 1188BrushProxy b = Brush; 1207BrushProxy b = Brush; 1224public override Primitive BlendOpacityMaskWithColor(BrushProxy color) 1548public override void PushOpacity(double opacity, BrushProxy opacityMask) 1555OpacityMask = BrushProxy.BlendBrush(OpacityMask, opacityMask); 1855public 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)
155public BrushProxy Brush 515BrushProxy oldbrush = _brush; 552private BrushProxy _brush; // primitive brush, possibly in world space
AlphaFlattener\Utility.cs (3)
1497BrushProxy bp = BrushProxy.CreateBrush(ib, maskBounds); 2149if (BrushProxy.IsEmpty(drawing.OpacityMask))
Serialization\DrawingContextFlattener.cs (2)
101Debug.Assert(!BrushProxy.IsEmpty(opacityMask), "empty opacity mask should not result in Push"); 222return BrushProxy.ReduceBrush(brush, bounds, Transform, _pageSize, _treeWalkProgress);
Serialization\VisualSerializer.cs (4)
265Debug.Assert(!BrushProxy.IsEmpty(brush), "Should not be serializing empty brush"); 1157if (!BrushProxy.IsEmpty(brush)) 1165if ((pen.Brush != null) && !BrushProxy.IsEmpty(pen.Brush)) 2269if (opacityMask != null && !BrushProxy.IsEmpty(opacityMask))
Serialization\VisualTreeFlattener.cs (1)
500if (effect == null && (Utility.IsTransparent(opacity) || BrushProxy.IsEmpty(mask)))