Questions tagged [drawingcontext]
75 questions
0
votes
1 answer
drawingContext.filter = 'blur(...px)' making my FPS drop to 1
I am creating a christmas background, its completely made out of different shapes (background mountains with bright moon, middleground lake with decorated christmas trees and foreground are dark pinetree tops).
I found out about…

Tony Stark
- 13
- 1
0
votes
0 answers
WPF: How to implement ROP2 Mode or similar with DrawingContext
I am converting my Win32 GDI implementation to C# WPF with DrawingContext. However, one thing that I am not sure is whether the DrawingContext supports ROP2 mode or something similar. If not, what is the alternative implementation without using…

Jim
- 1
0
votes
1 answer
How can I draw an arc in C# WPF with parameters?
I would like to know how can I draw an arc in C# , I'm trying using DrawEllipse but it doesn't work and it give wrong drawing.
However, I have searched for a method to draw an arc in the Class DrawingContext but I didn't find it.
…

csharp_devloper31
- 174
- 1
- 7
0
votes
1 answer
How to draw emojis on UIImageView using gesture
Hope all are safe in this pandemic situation.
I have been trying to design an application similar to SnapChat, I am stucked in an issue since a week for which I am not getting any library from gitHub or any code reference from stackOverFlow.
I have…

ayushi Vankawala
- 21
- 5
0
votes
1 answer
How can i get drawingcontext to draw recatangle with strokes
I need to draw a dashed rectangle on selection of items in an itemcontrol.I am looking for a way to draw a rectangle by DrawingContext.We have got DrawingContext.DrawRectangle and DawingContext.DrawRoundedRectangle.But How can we give the properties…

biju
- 17,554
- 10
- 59
- 95
0
votes
1 answer
How to programatically resize a DrawingVisual?
So, I'm new to WPF Drawing. For performance reasons, I've had to switch from regular controls like ContentControl and UserControl to more light-weight elements like DrawingVisual. I am working on a diagramming app which would probably have a max of…

heapoverflow
- 85
- 1
- 8
0
votes
0 answers
WPF Drawing images leaves unexpected empty line of pixels
I'm trying to render multiple images in WPF onto a canvas. In the following contrived example, I was able to reproduce the unexpected behavior using following code:
public class MyCanvas : Canvas
{
protect override void OnRender(DrawingContext…

Crosell
- 1
- 1
- 1
- 1
0
votes
1 answer
adding eventlistner to an html drawing
so i need some quick help , below is my code for a simple html drawing , as you can see when the screen loads the drawngs starts automatically , instead i want to add an event listener , whcih will allow the user that when he clicks on the screen…

Fasih Sajid
- 69
- 8
0
votes
1 answer
Rasterize wpf textblock into a bitmap via drawingcontext
My program is sort of copy version of MS paint and Pickpick.
and one of features is rasterizing the selected object such as textblock or shape.
Regarding the selectable object, in order to resize and move with adorner,
it has 1 ContentControl which…

Mark Choi
- 420
- 6
- 16
0
votes
1 answer
draw NSImage with CGContextDrawImage is too blurr
I draw my design image using CGContextDrawImage but its too blurry.
Please help me to improve its quality.
I am using this for drawing:
//NSImage* design_image
both sizes are same and i use this for interpolation
CGContextRef ct_ref=[context…

Learner
- 1
- 2
0
votes
0 answers
WPF - Slow performance when recreate and draw very big bitmap frequently
In my application, whenever the user moves the mouse around, I have to re-create a new Bitmap with very high resolution ( It may reaches 3000 pixels x 3000 pixels at its biggest size).
The size of the bitmap depends on where the mouse is. For…

Huyết Công Tử
- 155
- 1
- 10
0
votes
1 answer
Accessing the HTML5 Canvas's DrawingContext2D Save/Restore Stack?
Is there a way to access the HTML Canvas element's DrawingContext2D save and restore stack under the hood?
The purpose would be to save a base state, clip a region of it off, allow some operations to take place which may apply clip, save, restore…

CoryG
- 2,429
- 3
- 25
- 60
0
votes
0 answers
Rendered Rectangles missing in a huge WPF Control
I need a WPF Control with 300000000 Width and Height, on which I will draw Rectangles, based on some input. I am drawing the Rectangle on the OnRender of the control. For testing purpose I have put the control inside a ScrollViewer and am drawing…

Hemanath
- 19
- 4
0
votes
1 answer
DrawingContext.DrawRectangle to draw a rect
I'm trying to draw a rectangle into an Image:

sspine
- 53
- 1
- 6
0
votes
1 answer
Drawing Parallel Lines in C#
Sorry if this has been asked before, but I couldn't find a valid response or a response I could understand
Currently I have a code that draws a line from a Joint to Joint in the Kinect, this forms the Bone:
drawingContext.DrawLine(drawPen,…

ShatteredPheonix
- 77
- 1
- 16