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