public DestRectDemo(DrawImageEmulations example, CanvasControl sender) { fillPattern = example.checkedFillPattern; sourceBitmap = example.tiger; sourceEffect = new HueRotationEffect() { Source = sourceBitmap, Angle = 1 }; }
public OpacityDemo(DrawImageEmulations example, CanvasControl sender) { fillPattern = example.checkedFillPattern; premultipliedSource = CreateSourceImage(sender, CanvasAlphaMode.Premultiplied); ignoreSource = CreateSourceImage(sender, CanvasAlphaMode.Ignore); premultipliedTarget = new CanvasRenderTarget[2] { CreateTarget(sender, CanvasAlphaMode.Premultiplied), CreateTarget(sender, CanvasAlphaMode.Premultiplied) }; ignoreTarget = new CanvasRenderTarget[2] { CreateTarget(sender, CanvasAlphaMode.Ignore), CreateTarget(sender, CanvasAlphaMode.Ignore) }; }
public OffsetDemo(DrawImageEmulations example, CanvasControl sender) { fillPattern = example.checkedFillPattern; var rt = new CanvasRenderTarget(sender, (float)example.tiger.Size.Width, (float)example.tiger.Size.Height, sender.Dpi / 3); using (var ds = rt.CreateDrawingSession()) { ds.DrawImage(example.tiger, rt.Bounds); } sourceBitmap = rt; sourceEffect = new HueRotationEffect() { Source = sourceBitmap, Angle = 1 }; showSourceRectRT = new CanvasRenderTarget(sender, (float)rt.Size.Width, (float)rt.Size.Height, rt.Dpi); }
public IDemo Create(DrawImageEmulations example, CanvasControl sender) { return (IDemo)Activator.CreateInstance(Type, example, sender); }
public IDemo Create(DrawImageEmulations example, CanvasControl sender) { return((IDemo)Activator.CreateInstance(Type, example, sender)); }