All Questions
2,447 questions
2
votes
1
answer
83
views
How to shorten the length of a .Net C# System.Windows.Shapes.Line at runtime?
Before I illustrate my question with words please imagine a 2D square on a screen. In the center of that square is an archer with a bow.
In every corner of the square is a target. When a point on a ...
-2
votes
1
answer
56
views
Copy and (horizontally) invert a section of program's area
So I create some vector graphics on my program (windows form). Now I want to invert them and paste the inverted part elsewhere on the control. I could of course draw all the graphics in reverse ...
0
votes
0
answers
56
views
Constructing a triangle array with respect to material without using nested containers
Using Unity C#, I needed to procedurally create a mesh that may have several submeshes. Normally, after creating my vertex array, I'd make an array of lists where X is the submesh index (submesh index)...
0
votes
0
answers
41
views
Drawing image to datagridview doesn't show up until cells repaint
I'm building a "sequencer style" application. In part of it, I want to draw the waveform of an audio sample onto a row. However, the image doesn't fully appear until the cells it crosses are ...
-4
votes
1
answer
124
views
Control.Invalidate() use too much RAM. Optimization of C# WinForms drawing
I'm developing one game on WinForms on C# and i have a rotating drum of a revolver with cartridges. But my programm use over 2GB RAM. This is crazy. Even if i remove all code from OnPaint situation ...
0
votes
0
answers
45
views
Generating point cloud from a mask and depth map
I have a mask texture and depth map, the mask texture has resoultion of 316* 360 and the depth map has resoultion of 1280 * 720, I'm trying to check for each pixel in the mask if it's in the depth map,...
0
votes
2
answers
80
views
How to pass a variable to a GraphicsView in MAUI
I would like to pass a variable into a GraphicView to update a drawing by, for example, pushing a button.
I have gone through several examples on Stack Overflow about this issue. (I tried to publish ...
0
votes
1
answer
50
views
Is it possible to change hue, saturation, brightness and transparency of a Bitmap with a single ColorMatrix?
I would like to be able to change the hue, saturation, brightness and transparency with a single redraw of a Bitmap. I currently have this function (adapted from this answer: https://stackoverflow.com/...
0
votes
0
answers
39
views
Set two overlapping 2D GameObjects with Images attached to half-opacity as if it were a single image
I will refer to these three images to aid the explanation this question.
Suppose I have two GameObjects in Unity 2D, both with Image components attached. Further suppose that one of the GameObjects ...
0
votes
0
answers
69
views
Skia perspective matrix transformation
I'm trying to create a text effect like in the iconic Star Wars opening sequence using Skia (or SkiaSharp, but that doesn't matter).
Using the following code I can get the text to appear tilted ...
0
votes
0
answers
47
views
Can't properly convert Unity View Matrix to different coordinate system since switching to VR
I'm writing a Unity plugin which uses a separate renderer. The idea is to combine both images based on depth. To get the images to align I take Unity's View- and Projectionmatrices and put them into ...
0
votes
0
answers
64
views
Nearest neighbour interpolation with transparency
I'm new to C# and trying to write a program that places two transparent images one on top of the other using Forms.
The pictures are resized using the nearest neighbor interpolation.
The problem is ...
0
votes
1
answer
23
views
SKImage loading image but drawing it as blue, when it has yellow color
Issue
When drawing a PNG image, it is drawn with a blue tint.
Code
updated to include how the canvas is created
SKImageInfo info = new SKImageInfo(2000, 2000);
SKBitmap bitmap = new SKBitmap(info);
...
-3
votes
1
answer
54
views
How to draw graphs with various-looking edges in Unity?
I'm making a game in Unity, and I have some set of "nodes" and relationships between them. I've been looking for a way to visualize these relationships (i.e. draw a graph).
But all the ...
0
votes
1
answer
75
views
Why doesn't Graphics.Clear appear to work properly in my custom Windows forms control?
My understanding of how you should draw a custom Windows forms control is to first call Graphics.Clear to refresh the control's background, then draw whatever you want on top of that. As such, I have ...