199 questions
1
vote
1
answer
108
views
Copy part of the drawing in the same DrawingSession
I want to design a continues moving "waterfall" to represent a radio spectrum.
The way to do this in for example HTML5 is to draw 1 horizontal line at the top.
Then copy the entire drawing ...
0
votes
2
answers
277
views
Use of GaussianBlurEffect in Winui 3 and CommunityToolkit.WINUUI.UI version 8
How can use GaussianBlurEffect in WINUI 3 and CommunityToolkit.WINUI,UI versione 8?
public static CompositionEffectBrush CreateBlurEffectBrush(double amount = 0.0)
{
var effect = new ...
0
votes
1
answer
65
views
Removing from one list changing another list unexpectedly
I am trying to implement an undo functionality in my app, part of the code that gets executed when the undo button is pushed is as follows :
if (this.threadStep > 0)
{
Debug.WriteLine($"...
1
vote
1
answer
136
views
Win2D CanvasBitmap::CreateFromBytes arguments don't match
I'm trying to render an image loaded into a cv::Mat object to an Win2D canvas.
The canvas:
<canvas:CanvasControl Draw="CanvasControlDraw" x:Name="GalleryCanvas" ClearColor="...
1
vote
0
answers
65
views
Rendering delay in loading the font from the "ms-appdata://" in win2d?
I have requirement of loading the text on scroll, each text will be having different font and such texts are in 100's, while scrolling i will be fetching the fonts from the ms-appdata://, which is ...
0
votes
2
answers
142
views
How Can A Non-Abstract Property of a Predefined Abstract Class Be Accessed?
I have populated an array of type ICanvasEffect with objects of derived classes, such as GaussianBlurEffect, PosterizeEffect, etc.
List<ICanvasEffect> effects = new List<ICanvasEffect>();
...
-2
votes
1
answer
174
views
How to take text input in win2d just like we do in uwp with TextBox?
How to take text input in win2d like we do in uwp with TextBox?
0
votes
0
answers
156
views
Adjust fontsize to fill fixed rectangle with text of varying length on CanvasDevice
I am drawing text on a canvas. This text can be of variable length. My requirement is for it to have fixed height. For example, if the text is a short word like "hello", it should appear in ...
0
votes
0
answers
134
views
How to convert text to image using Win2D in a UWP Desktop application?
I have a UWP Desktop application in which I need to transform a few lines of text into an image and then use that image in other operations. How do I do this? Any help is most welcome. Thanks.
...
0
votes
1
answer
158
views
How to make Win2D BlendEffect apply to current drawing surface (background)?
I want to draw some images on to existing canvas using multiply blend mode. However, I don't know how to do it as the BlendEffect class require me to assign the Background variable but that is suppose ...
0
votes
1
answer
184
views
Screenshot video colours are brighter or darker than those on screen
I'm trying to encode a video from a series of screenshots of a UWP control. I can export still images with no issue, but when I try to convert a series of screenshots to a video the colours in the ...
2
votes
2
answers
879
views
Export UWP canvas to SVG
I'm trying to create an SVG file from some shape objects(path geometries, ellipses etc.) drawn on XAML canvas controls (the canvases are rendered on top of each other inside grid controls). It looks ...
1
vote
1
answer
628
views
Load an Image to a Canvas Control from a File Picker
What I'm trying to do in a UWP app with Win2D:
User pressed a button to add an image and picks their file.
That file gets loaded as a resource for a Canvas Control.
The image then gets rendered to the ...
0
votes
2
answers
227
views
How to get the remaining text after clipping in CanvasTextLayout in Win2D using C#?
I'm developing a UWP application using Win2D, where I want to place certain text inside a Rect (rectangle) of defined width and height. If the text exceeds the width of the Rect then I want to clip ...
0
votes
2
answers
340
views
How to add contents of CanvasControl to a MediaClip
I'm creating a uwp app where text a user types in is converted into a video overlay. The user loads the video, types in their text, gets a preview of the video with the text, then they can save their ...
0
votes
1
answer
521
views
How to rotate text in Win2D using CanvasControl drawing session?
I'm developing a UWP application using Win2D, and I need to rotate text using the CanvasControl Drawing session. I used public void DrawText(string text, Vector2 point, Color color) to render text.
...
0
votes
1
answer
425
views
How to edit .svg file attribute without changing the original file in Win2D?
I'm developing an UWP application using Win2D. I am able to draw SVG in CanvasControl but I don't know how to edit the attributes of the .svg file (xml format)?
My code :
private async void ...
0
votes
1
answer
742
views
How to load an svg image in win2d (CanvasVirtualControl) using c#?
I'm developing an UWP app using Win2D and I want to know how to load an .svg file(present in my application) in Win2D. I don't know how to read the svg file and convert it into RandomAccessStream.
1
vote
0
answers
2k
views
Is There any way to achieve Acrylic Blur Effect in WPF?
I have been trying to mimic the acrylic blur of UWP Application into my WPF Application. I have already tried using DWM Blur but it is not so blurry as the Acrylic Brush in UWP & also tried with ...
0
votes
0
answers
89
views
CanvasVirtualControl InvalidateRegions Splitted automatically , Why?
What i have Tried is?
My Xaml Code:
<Canvas x:Name="MyCanvas">
<Button Content="InvalidateParticularRegion" Height="100" Canvas.Left="300" ...
0
votes
1
answer
67
views
how to load webview in canvasvirtualControl in win2d?
How to load WebView in CanvasVirtualControl in Win2D ?
Is there any way to load webView in CanvasVirtualControl?
0
votes
1
answer
386
views
In win2d,how to combine the DrawRect() and DrawTextLayout() into single canvasBitmap?
I have a CanvasControl in my XAML.Using that I'm going to draw a rectangle using CanvasDrawingSession.DrawRectangle(). Inside that Rectangle ,I have some text .And the text has been drawn using ...
1
vote
1
answer
542
views
Rotate Image in Win2D
I'm trying to rotate image but couldn't get expected result.
I've tried with WIn2D but couldn't make image as expected.
My tried Code
public async void Rotate(string originalImagepath, Rect ...
1
vote
1
answer
175
views
UWP: Retrieving installed fonts causes exception
In my UWP app, I have been retrieving the installed fonts using
try
{
var fonts = CanvasTextFormat.GetSystemFontFamilies();
return (fonts.Length>0) ? fonts.OrderBy(f => f)....
0
votes
2
answers
490
views
Scaling image using Bitmaptransform gives blured images in win2d
This is what I have tried:
var decoder = await BitmapDecoder.CreateAsync(fileStream);
BitmapTransform bitmapTransform = new BitmapTransform();
bitmapTransform.ScaledHeight = 300;
bitmapTransform....