Click here to Skip to main content
15,867,488 members
Everything / Graphics

Graphics

graphics

Great Reads

by honey the codewitch
GFX is a fast and full featured replacement for standard IoT drawing libraries that is optimized to reduce bus I/O
by Sergey Alexandrovich Kryukov
Addresses questions on graphics, threading with UI, form development, printing and more
by CMalcheski
Thinking outside the box can result in critical performance gains
by WebMaster
Some simple examples of how to apply affine transformations in computer graphics.

Latest Articles

by honey the codewitch
Display automated (optionally controllable) Tetris on an LCD or Neopixel panel
by honey the codewitch
Got an embedded or IoT widget with a screen but no real memory or flash space to speak of? Read this.
by honey the codewitch
Create ASCII art from common image formats and text
by Sergey Alexandrovich Kryukov
Another variant of the cross-platform replacement for all those office presentation applications in a single file, and now this file is JavaScript

All Articles

Sort by Score

Graphics 

8 Mar 2022 by honey the codewitch
GFX is a fast and full featured replacement for standard IoT drawing libraries that is optimized to reduce bus I/O
22 Mar 2017 by Sergey Alexandrovich Kryukov
Addresses questions on graphics, threading with UI, form development, printing and more
4 Oct 2017 by CMalcheski
Thinking outside the box can result in critical performance gains
27 Dec 2012 by WebMaster
Some simple examples of how to apply affine transformations in computer graphics.
10 Nov 2018 by Bjørn
Editing GIF colors without touching the image data within
7 Sep 2010 by Colin Vella
This article presents an algorithm and data structures to implement auto-tiling as seen in RPG Maker, the Starcraft level editor, etc.
23 Oct 2023 by honey the codewitch
Create ASCII art from common image formats and text
22 Jan 2017 by Miguel Diaz Kusztrich
A simple way to build a wide family of fractals
30 May 2017 by Voevudko A. E., Ph.D.
Understanding, designing, generating and plotting Kronecker product based fractals and offering web-pages supporting it.
9 Oct 2016 by Midi_Mick
Alleviate issues with Image objects created from streams and files.
10 May 2021 by Steffen Ploetz
Check whether ReactOS is able to run OpenGL, determine a convincing IDE and get started with the OpenGL on ReactOS.
4 Sep 2023 by Sergey Alexandrovich Kryukov
Another variant of the cross-platform replacement for all those office presentation applications in a single file, and now this file is JavaScript
11 Apr 2016 by Martin Mitáš
Direct2D or GDI+? Perhaps both, with a help of the right library.
27 Nov 2021 by honey the codewitch
How to take your IoT graphical interface from the mid-1990s into the present
27 Jul 2023 by Patrick Brunner
Examples of WPF applications using DirectX11 managed code (SharpDX and C#) based on Microsoft interop solution
12 Sep 2013 by Matt Scarpino
Using GPU Acceleration to Compute Ray-Triangle Intersection
8 Jan 2021 by Iman Abdollahzadeh
TrueType implementation from scratch
16 Apr 2018 by Voevudko A. E., Ph.D.
Demonstrating a few approaches to generating and plotting fractals in R and offering R scripts realizing it.
20 Mar 2018 by Voevudko A. E., Ph.D.
Continue defining and presenting Gearographic curves from the simplest to the most intriguing. Offering web-pages and R scripts used to illustrate different aspects of it.
3 Jun 2021 by honey the codewitch
Explore techniques for drawing using GFX
8 Jun 2021 by FranciskaR
More on fluid simulation
8 Feb 2021 by Uzi Granot
If you are a programmer that tried to introduce a kid to programming with Scratch, this article is for you. Comparing a simple game between Scratch and C#.
26 Feb 2023 by honey the codewitch
How to make very responsive, flicker free interactive screens without using a lot of memory
14 Jun 2012 by Sergey Alexandrovich Kryukov
Please see my comment to the question. You need to specify your application type or UI library you want to use. If you don't have preference, you should tell us about it, as "what would you advise".Now, very clear tutorial is — on what topic? Don't expect and look for tutorials on...
16 Jul 2020 by Christ Kennedy
Combine your own sprites with any MP4 you choose using this Animation Editor
2 Mar 2021 by tugrulGtx
Accessing VRAM-cached nucleotide sequences in FASTA formatted files (*.fna, *.faa) by index
2 May 2011 by Olivier Levrey
Handle the Paint event for your panel, and put all your drawing code inside that handler.public Form1(){ InitializeComponent(); //handle the Paint event for the panel panel1.Paint += (sender, e) => { //put you drawing code here //and use...
14 Jun 2012 by Espen Harlinn
Most likely you can use the Graph# library[^].Best regardsEspen Harlinn
14 Jun 2012 by VJ Reddy
Please see this CodeProject article Graphical BinaryTrees[^]In this article it is written that "This article is about binary trees. A Binary Tree contains unlimited number of nodes, the nodes can be removed, added, searched, etc. Here we will discuss on how to make a binary tree on c# code,...
25 May 2019 by dynamichael
Build an oct-tree from a color palette for a fast nearest color search
4 May 2021 by honey the codewitch
Use an ILI9341 display efficiently from an ESP32 without the Arduino framework. Load JPEGs.
21 Apr 2022 by honey the codewitch
Take advantage of the PlatformIO repository to easily add GFX to your projects
21 Mar 2011 by CDP1802
You forgot to tell us what you are using. WPF? Windows Forms?If it's Windows Forms, then the solution may be quite easy: You have drawn something and then minimize the form. When it is restored, all controls are told to redraw their contents and the old content is lost. You must simply...
12 Apr 2012 by OriginalGriff
Me, I'd hook up a recording scope to genuine probes and record actual info. Then feed that back into my software.If you truly simulate it, then it may or may not be realistic.
1 May 2012 by Sergey Alexandrovich Kryukov
This is because you are doing it wrong. Actually, this is a pretty common mistake.The rendering of graphics persists only if you perform it on each WM_PAINT Windows message. For this purpose, you should handle the event System.Windows.Forms.Control.Paint, or, better yet, override the virtual...
25 Jan 2016 by Samuel Teixeira
Why simple if we can be complex?
6 Dec 2019 by Vahe Karamian
Programming in itself is no small task. Graphics programming complicate things a tab-bit more!
12 Jul 2020 by honey the codewitch
PianoBox is a customizable musical keyboard control for Windows Forms. This is the first part of MidiUI.
14 Jan 2024 by OriginalGriff
First off, stop using On Error - use the more modern Try ... Catch instead. Then look at the definition of the function: IDirect3D9::CreateDevice (d3d9.h) - Win32 apps | Microsoft Learn[^] Or the MS tutorial: IDirect3D9::CreateDevice (d3d9.h)...
10 May 2023 by Peter Huber SG
WPF design might have been too clever when using DIP (device independent pixels)
10 Nov 2010 by Peter_in_2780
Almost all displays these days have square pixels. That is, if there are, say 42 pixels in one vertical cm, there will be 42 in one horizontal cm. So circles and squares look right if drawn naturally (width-in-pixels = height-in-pixels).Of course, the answers above are correct for finding the...
14 Mar 2011 by Olivier Levrey
Try something like://center of the rotationPointF center = new PointF(...);//angle in degreesfloat angle = 45.0f;//use a rotation matrixusing (Matrix rotate = new Matrix()){ //used to restore g.Transform previous state GraphicsContainer container =...
9 Jul 2011 by DaveAuld
There is a technical blog article on the subject;Face Recognition Project: Introduction To Face Recognition[^]
30 Aug 2011 by Simon Bang Terkildsen
You're asking multiple of questions none of them are easy enough to explain in a Q&A, you'll have to do your own research into the subjects and ask about the bits and pieces that troubles you.About storing your 3D objects in an array, I'm guessing you know how to take an object and put into...
30 Aug 2011 by Espen Harlinn
If you really want to understand whats going on in wpf Snoop[^] is a valuable tool. As the source code is available you could just borrow pieces of it and implement a xaml serializer.Or take a look at the example at the bottom of the DataContractAttribute[^] documentation page. A bit easier...
19 Jan 2012 by Sergey Alexandrovich Kryukov
Nothing will work unless you eventually run System.Windows.Forms.Application.Run [EDIT] or, alternatively, System.Windows.Forms.Form.ShowDialog [END EDIT].This is where the main cycle of a Forms application is executed; and this is something which I would call Forms application anyway. No...
27 Apr 2012 by Sergey Alexandrovich Kryukov
I'm adding this answer for clarification of my comment to the answer by VJ.Please see my past answer explaining why you should not use PictureBox and what to do instead:How do I clear a panel from old drawing[^].This answer explains how to write in both image and a control:draw a...
12 Oct 2012 by Sergey Alexandrovich Kryukov
Did you try to find anything at all. You will find plenty of samples:http://bit.ly/Q6JA1m[^].Perhaps this is not what you really want.Your question in not completely incorrect, but can be greatly improved. You should have re-formulated it:"How to use Wikipedia, Google, CodeProject...
12 Oct 2012 by Kenneth Haugland
There is one guy that has made some pretty fancy 3D WPF animation of raindrops in water.His blog, were the code is explained:http://stuff.seans.com/2008/08/24/raindrop-animation-in-wpf/[^]And you could download the source code in C# here:http://wavesim.codeplex.com/[^]
15 Mar 2013 by Sergey Alexandrovich Kryukov
Yes of course. You need to understand that OnPaint, which you are correctly using, is called on the Windows WM_PAINT messages, which your UI receives on each invalidation:http://msdn.microsoft.com/en-us/library/598t492a.aspx[^].Please see my past answers:Drawing Lines between mdi child...
30 Aug 2017 by morzel
Detecting a drone - OpenCV in .NET for beginners (Emgu CV 3.2, Visual Studio 2017)
18 Jun 2021 by honey the codewitch
Use GFX effectively with e-paper/e-ink displays
20 Apr 2022 by honey the codewitch
Implement a fancy color picker in your ESP32 WROVER or WROOM IoT applications
5 Jan 2010 by Abhinav S
wrote:Microsoft .NET Framework 3.5You need NET Framework 3.5 with Service Pack 1.
19 Apr 2010 by Dalek Dave
I wih to create an image to load as a background in a header on an html page that consists of a gradient from dark to lighter blue.Short of proprietry graphics packages, is there a simple way (ie free?) of achieving this?similar to these[^]
11 May 2010 by Adrian Pasik
I didnt see Your project but in most cases it is not geometry that is the problem. If You want to have realistic views get better textures, and then play a little bit with some bump mapping derivatives. (google for Parallax mapping)
15 May 2010 by #realJSOP
Needing it "soon" doesn't affect our willingness to help you because urgency on your part doesn't imply an emergency on our part.You're going to have to setup some sort of "undo" feature so you can undo changes in the reverse order that they occurred. The brute force approach is to maintain...
28 May 2010 by Anthony Mushrow
Which version of the DLL that your program is using depends on which build of the library your program actually linked to.You may either need to check your linker settings and make sure that in Release you are not linking with the debug lib or check your code for any #pragma comment(lib,...
7 Jun 2010 by Cedric Moonen
GPUToaster wrote:1. Why not other texture dimensions? Why it requires only textures of power two?I think it does that for optimization reasons. Not really sure why. As far as I know, loading a texture which is has not a size of power of two will work on certain computers but not on other...
16 Jun 2010 by Sauro Viti
Include the header atlimage.h (your project must use ATL or MFC) and use the class CImage: it provide an easy way to load, save, render and access pixels on images from/to various formats, like bmp, jpeg, png, etc.Here you can find the documentation about the class: CImage Class(ATL/MFC)[^]
17 Jun 2010 by CPallini
Another option (as CImage is a GDI+ wrapper) is using directly GDI+. :)
21 Sep 2010 by E.F. Nijboer
The most important issue is to use floating point numbers internally and apply rounding just before drawing. Internally you can then scale very easily by multiplying with some calculated screen ratio. If you created your application for 800x600 and now running on 1920x1080 you would...
6 Nov 2010 by Paul Michalik
1. Obtaining an intersection curve between two 3D surfaces has nothing to do with C# and also nothing to do with graphics programming. Hence nobody will be able to recommend you a book which "explains" this because such a book has not yet been written :) 2. The perfect solution to the...
6 Feb 2011 by Nish Nishant
In the old Borland and Turbo C++ for DOS days, it was quite easy to use console-graphics modes. VC++ has traditionally not supported these modes. Although people have hacked around with inline assembly and direct video buffer writes to do console mode graphics from VC++ too. Modern day VC++...
12 Feb 2011 by Albin Abel
Hi,Use Bitmap instead of image. Bit map can be directly created from image file name or from image itselfDim bmp as Bitmap=new Bitmap(image);then you may write it to a memory stream and get the bytes. Referhttp://www.vbforums.com/showthread.php?t=358917[^]But this will give...
15 Feb 2011 by William Winner
I'll put in as much answering as you did asking.C# create image[^]C# image color[^]
15 Feb 2011 by Nish Nishant
Here's an easy but rather inefficient approach:Bitmap bitmap = new Bitmap(100, 100);for (int i = 0; i
14 Mar 2011 by Piccadilly Yum Yum
Here's a simple code from msdn on how to translate and rotate a graph ...public void MultiplyTransformMatrixOrder(PaintEventArgs e){// Create transform matrix.Matrix transformMatrix = new Matrix();// Translate matrix, prepending translation vector.transformMatrix.Translate(200.0F,...
14 Mar 2011 by OriginalGriff
No. Not unless you draw them onto a blank, new image and then examine the image pixel by pixel.If you draw it on a form, there is likely to be other stuff on it which would make it difficult to work out what is part of the ellipse, and what isn't.What are you trying to do that needs that?
14 Mar 2011 by Nuri Ismail
You can use GraphicsPath Class[^]. Simply add your drawings to the path, using it's methods. After that you can access the points using PathPoints property[^] of GraphicsPath. Probably you can use this property together with GraphicsPath.PathTypes[^]. But this will not give you all of the...
14 Mar 2011 by Albin Abel
Hithe Graphics path points array will return only the optimized/generalized points in the path.Where as you can generate your own points using the ellipse drawing points as below.startX and startY are the centre point of the ellipsedouble minorAxisWidth = 50;double...
27 Nov 2011 by Sergey Alexandrovich Kryukov
Do two things: 1) don't draw in picture box; 2) render directly on some control, the way Control.OnPaint or event Paint, use Graphics object from the event argument. Also, it's good to use double buffering to avoid flicker.To change graphics, change data used in rendering and use...
11 Jun 2012 by Sergey Alexandrovich Kryukov
Please see my comments to the question. You can use either System.Windows.Forms with System.Drawing and GDI+ or WPF, not all together (in fact, you can use interop, but this is not practical).If you can consider using WPF, I would strongly recommend using it. It is designed with the support...
26 Jul 2012 by Dave Kreskowiak
It's not entirely clear what you're doing, so are you saying that you're writing this text to an image and then printing the image??Yeah, that's going to severely screw up any aliasing you do. Why??Because the image that you're drawing on is 96 DPI and when you print that image on...
28 Sep 2012 by Sharad.Patel
Hi Shivam, Please look at this article, i hope it's helpful to you.OpenS-CAD, a simple 2D CAD application[^]
19 Nov 2012 by Sergey Alexandrovich Kryukov
Please see my past answers:Drawing Lines between mdi child forms[^],capture the drawing on a panel[^],What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[^].The point is: you always paint in Paint event or in overridden OnPaint, and in timer handle you only call...
17 Mar 2013 by Sergey Alexandrovich Kryukov
You don't really need to represent a string as a graphic path for proper transform. Transformations are done using...
2 Apr 2013 by nv3
You did actually all that is necessary for your own coordinate calculation, assuming you leave the windows viewport in its native (text) mode. The two factors ScreenXSeconds and ScreenYGain are the factors with which you have to multiply the raw values. The names chosen are not to my liking, but...
4 Jun 2013 by Santhosh G_
I suggest to do it yourself instead of using others code.If you are using windows with opengl following steps are necessary to create a digital clock application.Please use wglUseFontBitmaps to create the text items.Prepare a timer[using SetTimer] which triggers in 1 second to redraw the...
15 Dec 2013 by Sergey Alexandrovich Kryukov
I suspect you have overlooked the feature, if you tried that many libraries, not 100% sure though. For example, you can use:http://canvasjs.com/html5-javascript-scatter-point-chart[^],http://demo.huihoo.com/rgraph/docs/scatter.html[^].I believe you can find a lot more if you expand your...
20 Jan 2014 by Sergey Alexandrovich Kryukov
There can be several different ways. As you did not share any detail on your goals and your preferences, I don't think going into detail for any of those possible variants wouldn't makes much sense.First of all, the approach depends on what application type you can have. It could be...
12 Dec 2014 by Maciej Los
Have a look here: Merging Images in .NET[^]More, you can find here: SearchBox[^]
11 Jun 2015 by Richard Deeming
This thread on StackOverflow seems to have the answer:http://stackoverflow.com/a/19174721/124386[^]Create an include file called resource.h and add this line to it:#define IDD_ABOUT 100Then include it at the top of your .cpp and .rc files:#include "resource.h" // add this...
4 Nov 2015 by bling
Your paint handler looks strange to me. private void Form1_Paint(object sender, PaintEventArgs e) { gDisplay.DrawImage(bitmap, new Point(0, 0)); }Try this:private void Form1_Paint(object sender, PaintEventArgs e){ ...
17 Apr 2016 by leon de boer
In this second part, we will create an OpenGL MDI application
31 Aug 2017 by RickZeeland
In addition to the nice article mentioned by Graeme (which deserves points really) Making Transparent Controls - No Flickering[^] , the following: If you want to "punch a hole", this article might be of interest: Phil Wright : Component Factory: .NET2, Transparent controls[^] Also using...
15 Apr 2018 by Patrice T
Quote: but using function 'myellipse' makes the animation very slow You want to improve speed, that process is named 'optimization', the tool that help you to spot bottle necks is the profiler. Profiling (computer programming) - Wikipedia[^] Optimization is about being critical about your...
17 Apr 2021 by honey the codewitch
GFX IoT graphics library part 2 - device independent bitmaps
25 Apr 2021 by honey the codewitch
Explore the basic drawing functionality provided by the GFX IoT library
6 May 2021 by honey the codewitch
Explore the inner workings of a highly capable IoT display driver for the ESP32
5 Jun 2021 by OriginalGriff
Try this: Bitmap myBitmap = new Bitmap(300, 100, e.Graphics); using (Graphics g = Graphics.FromImage(myBitmap)) { g.Clear(Color.White); g.DrawString("Test", textFont,...
18 Feb 2022 by honey the codewitch
Run your IoT display driver independent of the bus it uses, whether I2C, SPI or parallel
25 Mar 2022 by honey the codewitch
A more in-depth guide to creating drivers and other custom draw targets for GFX
12 Feb 2010 by Khaniya
I have a black object something like chess piece; I put it on rotating base against camera and takes 100s of photos from different angles by rotating base.Photos background is white.Now I want to combine those all photos and make 3D object Any link, tutorial, guidance is appreciated
24 Feb 2024 by honey the codewitch
Got an embedded or IoT widget with a screen but no real memory or flash space to speak of? Read this.
4 Jan 2010 by Christian Graus
When you answer yourself, your question is no longer 'unanswered', which will affect how many people will look at it. It also means when someone goes to reply, they can't see your second post. Edit your post to add detail if you need to, don't reply.Yes, I think you're on the right track.
9 Jan 2010 by Christian Graus
This is just dragging on and on. You seem to be asking for every step of your code. Perhaps you should learn to use google, so you can find stuff like this[^]. Or, just read the documentation, I guess....