Questions tagged [drawingcontext]

75 questions
0
votes
1 answer

C# DrawElipse Method without specifying a fill

Simple Question - How do I use drawing context to make an Ellipse but not fill it with colour? At the moment I have: drawingContext.DrawEllipse(drawBrush, null, jointPoints[jointType], JointThickness, JointThickness); This gives me an Ellipse…
0
votes
1 answer

WPF Canvas and DrawingVisuals disappear

I have a set of User Controls, derived from FrameworkElement. Each host one or more DrawingVisuals. These drawing visuals can represent text, graphics, progress meters etc and are used to display the states of various HMI devices. These,…
Muckers Mate
  • 399
  • 8
  • 23
0
votes
1 answer

Line is not displayed on startup but becomes visible on resize (WPF)

I have a WPF application where a line shape is only displayed when the application window is resized, as shown here: The red line is drawn on-the-fly, it is not defined in XAML. It displays fine. The blue line is defined in XAML, but its…
Sabuncu
  • 5,095
  • 5
  • 55
  • 89
0
votes
1 answer

how to draw above cashapelayer path

I am having a CAShapeLayer i want to draw above that layer.. I have taken a UIImageView and added on that CAShapelayer and now i starting drawing as user touch moves inside that CAShapelayer path. But when user touch ends i want to merge that drawn…
Alfa
  • 975
  • 7
  • 15
0
votes
1 answer

WPF FormattedText randomly disappears in high resolution images

I have the requirement to create 600 DPI "trifold" images, which have the dimensions of 25.5"x11" (three times the size of a Letter page). To do so, I’m using WPF Imaging through the DrawingVisual, DrawingContext, and RenderTargetBitmap classes. …
0
votes
2 answers

WPF DrawGeometry does not draw stroke

I hope this question was not asked before, I searched everywhere. My problem is that I'm drawing a set of coordinates on my wpf usercontrol with points, I managed to fill my polygon with background color but not with a stroke. Stoke for some reason…
Ockert
  • 3
  • 4
0
votes
1 answer

shadow on geometry drawn by drawcontext in wpf

I am rendering a rectangle on a textbox using the drawing context using the following code. drawingContext.DrawRoundedRectangle( new SolidColorBrush(Color.FromRgb(255, 246, 178)), null, new Rect(new…
ssarangi
  • 602
  • 1
  • 10
  • 28
0
votes
2 answers

WPF DrawingContext draw behind my objects

I have a canvas with some images, and i'm also using DrawGeometry, to draw a circle that is filling when the time is passing. This is how i draw the circle in my DrawingContext: protected override void OnRender(DrawingContext drawingContext) { …
Luis Tellez
  • 2,785
  • 1
  • 20
  • 28
0
votes
3 answers

Optimizing WPF DrawingContext.DrawLine

Is there a more efficient way of drawing lines in WPF other than using DrawingContext.DrawLine(pen, a, b); ? Im doing a lot of line drawing in my application, and 99% of the time is spent in a loop making this call. [a,b] come from a very large…
wforl
  • 843
  • 10
  • 22
0
votes
1 answer

Accessing Draw Context in Dispather timer gives exception

what i am trying to do is first find the angle of the shoulder joint till now i have managed to do that.what i wanted to do now is when the angle comes in the range between 70 and 90 a time starts for 3 sec and in each sec it should check…
ahmad05
  • 438
  • 2
  • 6
  • 23
0
votes
1 answer

Can i access DrawContext variable globally? ( in any class of my app)

My programming skills are not too good and em still very amateur at C# i would like to ask about Draw_Context what i am doing here is finding out angle between the joint ... what i wanted to do is when then angle comes between 70 and 90…
ahmad05
  • 438
  • 2
  • 6
  • 23
0
votes
1 answer

DrawImage filtering when drawing rotated image on WPF DrawingContext

I'm drawing an image on a control, rotated typically just a few degrees. This makes proper filtering important, but I am seeing artifacts that look like a nearest neighbor issue. Where can I set the filter to use when drawing the image? The image is…
Jesper
  • 1
  • 2
0
votes
1 answer

WPF custom Control with custom drawing and ActualWidth

I'm trying to create a custom control (deriving from Control) with its own drawing logic. The control is simply drawing a diagonal line from the upper-left corner to the right-bottom corner of the control. This logic is based on the control's…
Reyhn
  • 997
  • 1
  • 11
  • 22
0
votes
1 answer

Drawing lines in WPF on DrawingContext with outer lines

I'm trying to draw a lot of similar kind of lines in WPF as seen in this question, but the difference is that I need to draw it on a DrawingContext of a DrawingVisual object. How can it be done?
Lord Gamez
  • 299
  • 7
  • 15
-1
votes
3 answers

Draw relative to center with DrawingContext

I've been wondering how to draw stuff in WPF with a DrawingContext relative to something that's not the top left corner of the control. My problem is that I want to draw some shapes by connecting various dots, and those dots have to be positionned…
Etienne de Martel
  • 34,692
  • 8
  • 91
  • 111
1 2 3 4
5