本文整理汇总了C#中IImageProvider类的典型用法代码示例。如果您正苦于以下问题:C# IImageProvider类的具体用法?C# IImageProvider怎么用?C# IImageProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IImageProvider类属于命名空间,在下文中一共展示了IImageProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ComponentManager
public ComponentManager(IComponentConfiguration configuration, IImageProvider imageProvider,
ICameraDevice cameraDevice)
{
device = cameraDevice;
provider = imageProvider;
componentConfiguration = configuration;
}
示例2: LensTiltDepthOfFieldEffect
/// <summary>
/// Creates and initializes a new lens tilt depth-of-field effect.
/// </summary>
/// <param name="source">The source image to be blurred.</param>
/// <param name="focusBand">The band that represents the focus area in the image. Pixels within this band won't be blurred.
/// Areas outside of the area will be progressively more blurred as the distance from the focus band increases..</param>
/// <param name="blurStrengthAtEdge1">Strength of the blur on the Edge1 side of the focus band.</param>
/// <param name="blurStrengthAtEdge2">Strength of the blur on the Edge2 side of the focus band.</param>
public LensTiltDepthOfFieldEffect(IImageProvider source, FocusBand focusBand, double strengthAtEdge1, double strengthAtEdge2, DepthOfFieldQuality quality)
: base(source, quality)
{
FocusBand = focusBand;
StrengthAtEdge1 = strengthAtEdge1;
StrengthAtEdge2 = strengthAtEdge2;
}
示例3: GetEffectInternalAsync
protected override MaybeTask<IImageProvider> GetEffectInternalAsync(IImageProvider source, Size sourceSize, Size renderSize)
{
m_radialGradient.CenterPoint = new Point(m_centerX, m_centerY);
m_radialGradient.EllipseRadius = new EllipseRadius(m_radiusX, m_radiusY);
return new MaybeTask<IImageProvider>(m_gradientImageSource);
}
示例4: PrepareGroup
protected sealed override IImageProvider PrepareGroup(IImageProvider groupSource)
{
m_mustGetNewSize = true;
var blurCanBeApplied = TryPrepareLensBlurProperties();
if (!blurCanBeApplied)
{
return Source;
}
LensBlurEffect.Source = groupSource;
LensBlurEffect.KernelMap = KernelMapSource;
LensBlurEffect.BlendKernelWidth = LensBlurEffect.Kernels.Max(w => w.Size) / 2;
switch (Quality)
{
case DepthOfFieldQuality.Preview:
LensBlurEffect.Quality = GetQualityForPreview();
break;
case DepthOfFieldQuality.Full:
LensBlurEffect.Quality = GetQualityForFull();
break;
default:
throw new NotImplementedException(String.Format("Quality {0} currently unsupported", Quality.ToString()));
}
m_quality.Reset();
return LensBlurEffect;
}
示例5: WallpaperComposerParameters
/// <summary>
/// Initializes the WallpaperComposerParameters with a set of properties
/// </summary>
/// <param name="imageProvider">ImageProvider to be used by the WallpaperComposer</param>
/// <param name="imageResizer">ImageResizer to be used by the WallpaperComposer</param>
/// <param name="wallpaperProcessor">WallpaperProcessor to be used by the WallpaperComposer</param>
public WallpaperComposerParameters(IImageProvider imageProvider,
IImageResizer imageResizer, IWallpaperProcessor wallpaperProcessor)
{
this.ImageProvider = imageProvider;
this.ImageResizer = imageResizer;
this.WallpaperProcessor = wallpaperProcessor;
}
示例6: ClaudiaIDE
/// <summary>
/// Creates a square image and attaches an event handler to the layout changed event that
/// adds the the square in the upper right-hand corner of the TextView via the adornment layer
/// </summary>
/// <param name="view">The <see cref="IWpfTextView"/> upon which the adornment will be drawn</param>
/// <param name="imageProvider">The <see cref="IImageProvider"/> which provides bitmaps to draw</param>
/// <param name="setting">The <see cref="Setting"/> contains user image preferences</param>
public ClaudiaIDE(IWpfTextView view, IImageProvider imageProvider, Setting setting)
{
try
{
_dispacher = Dispatcher.CurrentDispatcher;
_imageProvider = imageProvider;
_view = view;
_positionHorizon = setting.PositionHorizon;
_positionVertical = setting.PositionVertical;
_imageOpacity = setting.Opacity;
_fadeTime = setting.ImageFadeAnimationInterval;
_image = new Image
{
Opacity = setting.Opacity,
IsHitTestVisible = false
};
_adornmentLayer = view.GetAdornmentLayer("ClaudiaIDE");
_view.ViewportHeightChanged += delegate { RepositionImage(); };
_view.ViewportWidthChanged += delegate { RepositionImage(); };
_view.ViewportLeftChanged += delegate { RepositionImage(); };
_imageProvider.NewImageAvaliable += delegate { _dispacher.Invoke(ChangeImage); };
ChangeImage();
}
catch (Exception)
{
}
}
示例7: GameViewModel
public GameViewModel(int totalQuestions, IImageProvider imageProvider, IStorageProvider storageProvider)
{
_imageProvider = imageProvider;
_storageProvider = storageProvider;
// register all the events
CommandEvents.ContinueButtonPressed += new EventHandler(ContinueButtonPressed);
CommandEvents.AnswerButtonPressed += new EventHandler(AnswerButtonPressed);
CommandEvents.HighScoreContinueButtonPressed += new EventHandler(HighScoreContinueButtonPressed);
DisplayHighScore += new EventHandler(DisplayScore);
// check to see whether any game state is already loaded
if (_storageProvider.GameStateExists())
{
_game = _storageProvider.LoadGameState();
// check if the player was in the middle of a question
if (_game.CurrentQuestion.Answered)
{
DisplayQuestion();
ContinueButtonPressed(this, new EventArgs());
}
else
{
DisplayQuestion();
}
}
else
{
_game = new Game(totalQuestions);
ContinueButtonPressed(this, new EventArgs());
}
}
示例8: ColorAdjustEffect
public ColorAdjustEffect(IImageProvider source, double red = 0, double green = 0, double blue = 0)
: base(source)
{
m_RedPercentage = red;
m_GreenPercentage = green;
m_BluePercentage = blue;
}
开发者ID:Nokia-Developer-Community-Projects,项目名称:real-time-filter-demo,代码行数:7,代码来源:ColorAdjustEffect.cs
示例9: CreateFakeLayerContext
private LayerContext CreateFakeLayerContext(Layer backgroundLayer, IImageProvider backgroundImage, Layer layer)
{
var invariants = new LayerContext.Invariants(backgroundLayer, new MaybeTask<IImageProvider>(backgroundImage), new Size(0, 0));
var layerContext = new LayerContext(invariants, backgroundLayer, layer, 1);
layerContext.PreviousImage = layerContext.BackgroundImage;
return layerContext;
}
示例10: GetEffectInternalAsync
protected override MaybeTask<IImageProvider> GetEffectInternalAsync(IImageProvider source, Size sourceSize, Size renderSize)
{
m_linearGradient.StartPoint = new Point(m_startX, m_startY);
m_linearGradient.EndPoint = new Point(m_endX, m_endY);
return new MaybeTask<IImageProvider>(m_gradientImageSource);
}
示例11: RecipeCSharpEffect
public RecipeCSharpEffect(IImageProvider source, double factor)
: base(source)
{
effect = new CSharp.MyEffect(source, factor);
SetPipelineBeginEnd(effect, effect);
}
示例12: ClaudiaIDE
/// <summary>
/// Creates a square image and attaches an event handler to the layout changed event that
/// adds the the square in the upper right-hand corner of the TextView via the adornment layer
/// </summary>
/// <param name="view">The <see cref="IWpfTextView"/> upon which the adornment will be drawn</param>
/// <param name="imageProvider">The <see cref="IImageProvider"/> which provides bitmaps to draw</param>
/// <param name="setting">The <see cref="Setting"/> contains user image preferences</param>
public ClaudiaIDE(IWpfTextView view, List<IImageProvider> imageProvider, Setting setting)
{
try
{
_dispacher = Dispatcher.CurrentDispatcher;
_imageProviders = imageProvider;
_imageProvider = imageProvider.FirstOrDefault(x=>x.ProviderType == setting.ImageBackgroundType);
_setting = setting;
if (_imageProvider == null)
{
_imageProvider = new SingleImageProvider(_setting);
}
_view = view;
_image = new Image
{
Opacity = setting.Opacity,
IsHitTestVisible = false
};
_adornmentLayer = view.GetAdornmentLayer("ClaudiaIDE");
_view.ViewportHeightChanged += delegate { RepositionImage(); };
_view.ViewportWidthChanged += delegate { RepositionImage(); };
_view.ViewportLeftChanged += delegate { RepositionImage(); };
_setting.OnChanged += delegate { ReloadSettings(); };
_imageProviders.ForEach(x => x.NewImageAvaliable += delegate { InvokeChangeImage(); });
ChangeImage();
}
catch
{
}
}
示例13: GetChain
private List<IImageProvider> GetChain(IImageProvider tail)
{
List<IImageProvider> chain = new List<IImageProvider>();
if (tail == null)
return chain;
chain.Add(tail);
var imageConsumer = tail as IImageConsumer;
while (imageConsumer != null)
{
var imageProvider = imageConsumer.Source;
if (imageProvider == null)
break;
chain.Add(imageProvider);
imageConsumer = imageProvider as IImageConsumer;
}
chain.Reverse();
return chain;
}
示例14: GetEffectInternalAsync
protected override MaybeTask<IImageProvider> GetEffectInternalAsync(IImageProvider source, Size sourceSize, Size renderSize)
{
((IImageConsumer)Effect).Source = source;
((SpotlightEffect)Effect).Position = new Windows.Foundation.Point(sourceSize.Width / 2, sourceSize.Height / 2);
return new MaybeTask<IImageProvider>(Effect);
}
示例15: RecipeCSharpFilter
public RecipeCSharpFilter(IImageProvider source, double factor)
: base(source)
{
effect = new FilterEffect(source);
effect.Filters = new IFilter[]{new CSharp.MyFilter (factor)};
SetPipelineBeginEnd(effect, effect);
}