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