¡@

Home 

c# Programming Glossary: graphics

How to draw directly on the Windows desktop, C#?

http://stackoverflow.com/questions/1536141/how-to-draw-directly-on-the-windows-desktop-c

Main string args IntPtr desktop GetDC IntPtr.Zero using Graphics g Graphics.FromHdc desktop g.FillRectangle Brushes.Red 0 0.. args IntPtr desktop GetDC IntPtr.Zero using Graphics g Graphics.FromHdc desktop g.FillRectangle Brushes.Red 0 0 100 100 ReleaseDC..

Converting Bitmap PixelFormats in C#

http://stackoverflow.com/questions/2016406/converting-bitmap-pixelformats-in-c-sharp

System.Drawing.Imaging.PixelFormat.Format32bppPArgb using Graphics gr Graphics.FromImage clone gr.DrawImage orig new Rectangle.. using Graphics gr Graphics.FromImage clone gr.DrawImage orig new Rectangle 0 0 clone.Width..

How do I rotate a picture in C#

http://stackoverflow.com/questions/2163829/how-do-i-rotate-a-picture-in-c-sharp

bmp new Bitmap img.Width img.Height turn the Bitmap into a Graphics object Graphics gfx Graphics.FromImage bmp now we set the rotation.. img.Height turn the Bitmap into a Graphics object Graphics gfx Graphics.FromImage bmp now we set the rotation point to.. turn the Bitmap into a Graphics object Graphics gfx Graphics.FromImage bmp now we set the rotation point to the center of..

Taking screenshot of a webpage programmatically [closed]

http://stackoverflow.com/questions/2316564/taking-screenshot-of-a-webpage-programmatically

origThumbnail new Bitmap 120 90 origImage.PixelFormat Graphics oGraphic Graphics.FromImage origThumbnail oGraphic.CompositingQuality.. new Bitmap 120 90 origImage.PixelFormat Graphics oGraphic Graphics.FromImage origThumbnail oGraphic.CompositingQuality CompositingQuality.HighQuality..

High Quality Image Scaling C#

http://stackoverflow.com/questions/249587/high-quality-image-scaling-c-sharp

object to draw the resized image into the bitmap using Graphics graphics Graphics.FromImage result set the resize quality.. the resized image into the bitmap using Graphics graphics Graphics.FromImage result set the resize quality modes to high quality..

Multiple colors in a C# .NET label

http://stackoverflow.com/questions/275836/multiple-colors-in-a-c-sharp-net-label

using the DrawString and MeasureString methods in the Graphics namespace. Writing UserControls in .NET is really not difficult.. to draw on pb.Image new Bitmap pb.Width pb.Height using Graphics g Graphics.FromImage pb.Image create all white background for.. on pb.Image new Bitmap pb.Width pb.Height using Graphics g Graphics.FromImage pb.Image create all white background for drawing..

How to add an extra button to the window's title bar?

http://stackoverflow.com/questions/2841180/how-to-add-an-extra-button-to-the-windows-title-bar

case WM_NCPAINT IntPtr hdc GetWindowDC m.HWnd using Graphics g Graphics.FromHdc hdc g.FillEllipse Brushes.Red new Rectangle.. WM_NCPAINT IntPtr hdc GetWindowDC m.HWnd using Graphics g Graphics.FromHdc hdc g.FillEllipse Brushes.Red new Rectangle Width..

How to effectively draw on desktop in C#?

http://stackoverflow.com/questions/2905783/how-to-effectively-draw-on-desktop-in-c

the desktop in C#. From searching a bit I ended up using a Graphics object from the Desktop HDC null . Then I painted normally using.. the Desktop HDC null . Then I painted normally using this Graphics object. The problem is that my shapes get lost when any part..

Double Buffering when not drawing in OnPaint(): why doesn't it work?

http://stackoverflow.com/questions/3113190/double-buffering-when-not-drawing-in-onpaint-why-doesnt-it-work

do all my drawing in the OnPaint event with the supplied Graphics object instead of using Panel.CreateGraphics and then drawing.. the supplied Graphics object instead of using Panel.CreateGraphics and then drawing to that EDIT This is the basic code I am using... void doc_Paint object sender PaintEventArgs e g doc.CreateGraphics Render ScaleFactor Offset private void Render float ScaleFactor..

Record Video of Screen using .NET technologies

http://stackoverflow.com/questions/397754/record-video-of-screen-using-net-technologies

target new Bitmap screenSize.Width screenSize.Height using Graphics g Graphics.FromImage target g.CopyFromScreen 0 0 0 0 new Size.. Bitmap screenSize.Width screenSize.Height using Graphics g Graphics.FromImage target g.CopyFromScreen 0 0 0 0 new Size screenSize.Width..

How to crop an image using C#?

http://stackoverflow.com/questions/734930/how-to-crop-an-image-using-c

processing share improve this question You can use Graphics.DrawImage to draw a cropped image onto the graphics object from.. target new Bitmap cropRect.Width cropRect.Height using Graphics g Graphics.FromImage target g.DrawImage src new Rectangle 0.. new Bitmap cropRect.Width cropRect.Height using Graphics g Graphics.FromImage target g.DrawImage src new Rectangle 0 0 target.Width..

Capturing webpage as image in c#, ensuring javascript rendered elements are visible

http://stackoverflow.com/questions/7803201/capturing-webpage-as-image-in-c-ensuring-javascript-rendered-elements-are-visi

ivo web.Document.DomDocument as IViewObject using Graphics g Graphics.FromImage bitmap get the handle to the device context.. web.Document.DomDocument as IViewObject using Graphics g Graphics.FromImage bitmap get the handle to the device context and..

Resizing an Image without losing any quality [closed]

http://stackoverflow.com/questions/87753/resizing-an-image-without-losing-any-quality

c# is Bitmap newImage new Bitmap newWidth newHeight using Graphics gr Graphics.FromImage newImage gr.SmoothingMode SmoothingMode.HighQuality.. newImage new Bitmap newWidth newHeight using Graphics gr Graphics.FromImage newImage gr.SmoothingMode SmoothingMode.HighQuality..

Get a screenshot of a specific application [duplicate]

http://stackoverflow.com/questions/891345/get-a-screenshot-of-a-specific-application

I know I can get the screenshot of the entire screen using Graphics.CopyFromScreen . However what if I just want the screenshot.. bmp new Bitmap width height PixelFormat.Format32bppArgb Graphics graphics Graphics.FromImage bmp graphics.CopyFromScreen rect.left.. width height PixelFormat.Format32bppArgb Graphics graphics Graphics.FromImage bmp graphics.CopyFromScreen rect.left rect.top 0 0..

Background color of a ListBox item (winforms)

http://stackoverflow.com/questions/91747/background-color-of-a-listbox-item-winforms

object sender DrawItemEventArgs e e.DrawBackground Graphics g e.Graphics g.FillRectangle new SolidBrush Color.Silver e.Bounds.. sender DrawItemEventArgs e e.DrawBackground Graphics g e.Graphics g.FillRectangle new SolidBrush Color.Silver e.Bounds Print text..

decimal vs double! - Which one should I use and when? [duplicate]

http://stackoverflow.com/questions/1165761/decimal-vs-double-which-one-should-i-use-and-when

is not important use double for speed. This includes graphics physics or other physical sciences computations where there..

Drawing SVG in .NET/C#? [closed]

http://stackoverflow.com/questions/1525421/drawing-svg-in-net-c

mimic System.Drawing.Graphics interface. c# svg vector graphics share improve this question Check out the SVG framework.. . What this means is that any code that uses GDI to draw graphics can easily output SVG as well simply by plugging in the SvgGraphics..

Alternatives to System.Drawing for use with ASP.NET?

http://stackoverflow.com/questions/1528525/alternatives-to-system-drawing-for-use-with-asp-net

blog post including C# code about using the ImageMagick graphics library through Interop over at TopTen Software Blog . This..

Complex UI inside ListBoxItem

http://stackoverflow.com/questions/15532639/complex-ui-inside-listboxitem

visible on screen 5 Say I wanted to introduce complex graphics to the equation. Is winforms rendering hardware accelerated.. the same way WPF does. Say I wanted to introduce complex graphics to the equation. Is winforms rendering hardware accelerated..

Fast work with Bitmaps in C#

http://stackoverflow.com/questions/1563038/fast-work-with-bitmaps-in-c-sharp

4 width height and contains RGBA of each pixel c# .net graphics bitmap pixels share improve this question You can do it..

.NET graph library around? [closed]

http://stackoverflow.com/questions/1578493/net-graph-library-around

for .net. Are there any out ps I mean GRAPH libraries not graphics nor charting libraries edit What I mean is graphs from graph..

Convert image to 1 bpp bitmap in .net compact framework

http://stackoverflow.com/questions/1836632/convert-image-to-1-bpp-bitmap-in-net-compact-framework

hDC I then used Graphics.FromHdc to get a managed graphics object that I could paint the report onto. I did saving with..

How do I rotate a picture in C#

http://stackoverflow.com/questions/2163829/how-do-i-rotate-a-picture-in-c-sharp

now draw our new image onto the graphics object gfx.DrawImage img new Point 0 0 dispose of our Graphics..

C#, convert image to grayscale

http://stackoverflow.com/questions/2265910/c-convert-image-to-grayscale

newBitmap new Bitmap original.Width original.Height get a graphics object from the new image Graphics g Graphics.FromImage newBitmap..

High Quality Image Scaling C#

http://stackoverflow.com/questions/249587/high-quality-image-scaling-c-sharp

image.HorizontalResolution image.VerticalResolution use a graphics object to draw the resized image into the bitmap using Graphics.. to draw the resized image into the bitmap using Graphics graphics Graphics.FromImage result set the resize quality modes to.. result set the resize quality modes to high quality graphics.CompositingQuality System.Drawing.Drawing2D.CompositingQuality.HighQuality..

Capture the Screen into a Bitmap

http://stackoverflow.com/questions/362986/capture-the-screen-into-a-bitmap

PixelFormat.Format32bppArgb Create a graphics object from the bitmap. gfxScreenshot Graphics.FromImage bmpScreenshot..

Regarding IE9 WebBrowser control

http://stackoverflow.com/questions/4612255/regarding-ie9-webbrowser-control

functions of IE9 My concern is I want to render some SVG graphics on it. Thanks Omky c# .net 3.5 web browser webbrowser control..

Comparison between XNA and DirectX (C#)

http://stackoverflow.com/questions/514872/comparison-between-xna-and-directx-c

code then you'll probably be able to write a faster graphics engine on top of DirectX. However for the hobbyist XNA has plenty..

How to calculate bounce angle?

http://stackoverflow.com/questions/573084/how-to-calculate-bounce-angle

With the xVelocity and yVelocity both being positive in 2D graphics right and down are typically positive the missile will travel..

c# write text on bitmap

http://stackoverflow.com/questions/6311545/c-sharp-write-text-on-bitmap

on bitmap I have following problem. I want to make some graphics in c# windows form. I want to read bitmap to my program and..

How to crop an image using C#?

http://stackoverflow.com/questions/734930/how-to-crop-an-image-using-c

use Graphics.DrawImage to draw a cropped image onto the graphics object from a bitmap. Rectangle cropRect new Rectangle ... Bitmap..

C# graph drawing library? [closed]

http://stackoverflow.com/questions/737771/c-sharp-graph-drawing-library

There is also a nice tutorial on how to use it. c# graphics share improve this question You might want to check out..

Get a screenshot of a specific application [duplicate]

http://stackoverflow.com/questions/891345/get-a-screenshot-of-a-specific-application

Bitmap width height PixelFormat.Format32bppArgb Graphics graphics Graphics.FromImage bmp graphics.CopyFromScreen rect.left rect.top.. Graphics graphics Graphics.FromImage bmp graphics.CopyFromScreen rect.left rect.top 0 0 new Size width height..