Skip to content

Graphics

DirectX, OpenGL and GDI/GDI+ discussions

This category can be followed from the open social web via the handle graphics@forum.codeproject.com

769 Topics 2.5k Posts
  • 0 Votes
    2 Posts
    2 Views
    R
    WDI wrote: I think this problem occurs because of x and y of points because when I change the points, the shape will fill Of-course the problem is occurring because of co-ordinates x and y. :) modified on Tuesday, December 21, 2010 12:08 AM
  • tool for real time graph plotting..

    csharp data-structures performance help question
    4
    0 Votes
    4 Posts
    2 Views
    L
    Since your question mentions the fact that you want to do this in .NET I would expect the .NET Framework forum would be a good start. I note that you have been a CP member for over a year now so you should be familiar with the posting guidelines. Just say 'NO' to evaluated arguments for diadic functions! Ash
  • TRUE == FALSE in GDI: Another rtfm?

    graphics debugging question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Freeing Selected BM from DC in GDI

    graphics question announcement learning
    6
    0 Votes
    6 Posts
    6 Views
    T
    That is a great answer; I now understand completely. Thank You Tadeusz Westawic Sum quid sum.
  • diffrent DC share the same OpenGL list

    graphics game-dev question
    2
    0 Votes
    2 Posts
    3 Views
    S
    A display list could be shared between multiple rendering context; it doesn't matter the device context to which each HRC is related. Then the answer is yes.
  • Make picturebox image mirror vertical

    question
    5
    0 Votes
    5 Posts
    2 Views
    M
    i fix that! System.IntPtr srcDC = GetDC(f.Handle); Bitmap bmp = new Bitmap(****50****, f.Height + 30); Graphics g = Graphics.FromImage(bmp); System.IntPtr bmDC = g.GetHdc(); BitBlt(bmDC, 0, 0, **50**, bmp.Height, srcDC, r, -30, 0x00CC0020 /*SRCCOPY*/); r += 10; ReleaseDC(f.Handle, srcDC); g.ReleaseHdc(bmDC); g.Dispose(); Image img; img = bmp; img.RotateFlip(RotateFlipType.RotateNoneFlipX); f3.pictureBox1.Image = img; i should set bitmaps width to 50!(because my pixtureboxs width and actually my last images width is 50); tnx. و این منم زنی تنها در آستانه فصلی سرد...
  • Help)

    help
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    3 Posts
    3 Views
    C
    Ah, the old RTFM gotcha. Oops! I really need to pay closer attention. LOL Yeah, I just decoder to append the images together, which keeps the size close. Now i'm just trying to work out saving off the indexes in the same file. Thanks for bringing that to my attention. Chris
  • OpenGL draw 3D earth with texture

    graphics game-dev json question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Sorting colors

    algorithms
    3
    0 Votes
    3 Posts
    2 Views
    N
    Thank you for your reply. As you mentioned, the order can be based on hue. I have already done some experiments with that. If we use HSV or HSL color model, and then the priority is as hue > sat > val/lum, still the order was not satisfying. Then I tried CIELAB, but have no idea on how to sort the colors in this color space. In some sites, it is said that this color space is best for our (human) perspective. I just want to get an order in the appearance of colors. I doubt, it is not so easy to sort and list the colors in one dimension. Trying again and again... :) - ns ami -
  • Page layout library

    c++ com graphics
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Direct2d CB 6.0 error

    c++ delphi graphics game-dev help
    4
    0 Votes
    4 Posts
    3 Views
    V
    There are no other kods - 3 #include lines only. D2DBaseType.h : typedef struct D2D_POINT_2F { FLOAT x; FLOAT y; } D2D_POINT_2F; --- d2d1.h : typedef D2D_POINT_2F D2D1_POINT_2F; typedef struct { D2D1_POINT_2F point; D2D1_SIZE_F size; FLOAT rotationAngle; D2D1_SWEEP_DIRECTION sweepDirection; D2D1_ARC_SIZE arcSize; } D2D1_ARC_SEGMENT; --- d2d1helper.h : D2D1FORCEINLINE D2D1_ARC_SEGMENT ArcSegment( __in CONST D2D1_POINT_2F &point, __in CONST D2D1_SIZE_F &size, __in FLOAT rotationAngle, __in D2D1_SWEEP_DIRECTION sweepDirection, __in D2D1_ARC_SIZE arcSize ) { D2D1_ARC_SEGMENT arcSegment = { point, size, rotationAngle, sweepDirection, arcSize }; return arcSegment; } The main difference in structure D2D1_ARC_SEGMENT -> D2D1_POINT_2F point; and ArcSegment( __in CONST D2D1_POINT_2F &point, ... It should be critical -> point and &point :confused:
  • Some questions

    graphics csharp wpf game-dev help
    3
    0 Votes
    3 Posts
    3 Views
    M
    Thanks for your reply. Is there the possibility to change for example the Dash/PenLineCaps of an Line (LPD3DXLINE) rendered with Direct3D? I can set the Dashstyle, but i think thats all. Perhaps I should write my own code to create shapes/geometries.
  • Resize Image

    help question
    3
    0 Votes
    3 Posts
    3 Views
    E
    Archimedes24 wrote: but when the same word document is printed as a pdf, the edges are all jagged and the quality is quite rubbish. what are you using as the PDF output? are you using the save-as within word for pdf? or adobe pdf printer? or other free pdf printer? You may just need to change the default properties of your PDF output to increase the quality of the images. This is quite common to do when storing image graphs which do not convert to JPG low quality without significant loss of data. Archimedes24 wrote: when we tried resizing one of our images (3000X3000 pixels) to 75X75, it looks fine, and also comes out well when printed directly or as image in a word document that sounds like you managed a decent shrink if the image is viewable well without saving to a PDF. I would focus on the PDF settings if the image looks okay after shrinking and used within a print or display. I assume you are referring to using the shrunken image within these two (word and printing) and not the original image. If the problem is really the shrinking, you can choose a bicubic resize and drop in no more than 1/3rd or 1/2 resolution at a time. A good algorithm will take into account blending multiple pixels into one, but a bad algorithm may need to drop half resolution again and again until you reach your goal. Theoretically you will arrive at the same result, but depending on implementation you might not. http://www.imagemagick.org/script/convert.php[^] Adaptive resize is generally good, though from your description I think the problem is not the resize, but the PDF output. _________________________ John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others." Shhhhh.... I am not really here. I am a figment of your imagination.... I am still in my cave so this must be an illusion....
  • Managed and UnManaged DirectX APIs.

    graphics game-dev
    4
    0 Votes
    4 Posts
    4 Views
    X
    dybs wrote: One thing to keep in mind is Managed DirectX is no longer in active development, and only supports up to DirectX 9.0c. If you want to access any DirectX 10 or 11 features, I would suggest using SlimDX[^]. So what's a problem in using Unmanaged DX? Work without managed wrapping. And if you want to access to DX 10 features, not essentially to install SlimDX, in DX SDK including libraries and samples that are necessary for DX 10 features.
  • Create a gui for linux.

    linux tools
    2
    0 Votes
    2 Posts
    2 Views
    S
    Writing Window Manager for Linux is a very big project. It is not going to be a mini project, it is a life time project. To write a Window Manager you will need to understand Linux at the lower level, you will need to read about Linux kernel, system calls, X-server and many other things. You cannot use Qt, KDevelop, GTK or any other library because they assume that a Window Manager is already running. If this is only for learning then I will suggest that you write a program in top of an existing Window Manager and you can use Qt for that purpose. This means that your GUI manager will be an application in an existing window manager. -Saurabh modified on Sunday, April 25, 2010 9:39 PM
  • SEO vs. GRAPHIC DESIGNS?

    visual-studio graphics tutorial question
    4
    0 Votes
    4 Posts
    5 Views
    F
    Yes in so far as the search engines look at things like file size, page load times, etc... But a large amount of images also give you several SEO advantages like img file names, alt tags, etc... The biggest thing you need to pay attention to though is that you don't use your keywords in your images, always make them text or your wasting your time, always optimize your images for the web, and pay attention to layout so your page is laid out in the following order usability/SEO layout/artistic design (which is different than good graphic design) SEO layout is basically the SE only read the first 350-550 words on a page, so don't create a layout where a bunch of junk comes before your real content. Hope these basics help
  • [OPENGL] render mesh/lighting

    graphics game-dev
    3
    0 Votes
    3 Posts
    2 Views
    E
    it appears that your normals are flip flopped, at least that's what causes my some of my renders to go astray... I'd blame it on the Brain farts.. But lets be honest, it really is more like a Methane factory between my ears some days then it is anything else...
  • drawing a double dash line

    graphics question csharp winforms
    3
    0 Votes
    3 Posts
    2 Views
    E
    When I did this, I used either a Line drawing algorith(draw by pixel), or draw by overlapping lines... for a double line: g.Drawline(new Pen(7, black),pA,pB); g.Drawline(new Pen(3, white),pA,pB); results in a double line if you want it to be dashed... g.Drawline(new Pen(7, black),pA,pB); g.Drawline(new Pen(7, white),pA,pB-1x); g.Drawline(new Pen(7, black),pA,pB-2x); g.Drawline(new Pen(7, white),pA,pB-3x); g.Drawline(new Pen(7, black),pA,pB-4x); //cover up the "middle part" g.Drawline(new Pen(3, white),pA,pB); --O.k. I know it isn't "Real Code" but that should give you the idea... I'd blame it on the Brain farts.. But lets be honest, it really is more like a Methane factory between my ears some days then it is anything else...
  • 0 Votes
    2 Posts
    2 Views
    E
    It all depends on what you are attempting to do, and what you already know how to do: Reasons to Use XNA: Don't know DirectX, or are not a control freek(XNA is just shorthand Managed DirectX..Basically). -Caviat You won't be able to modify meshes and models easily(at least as easily as if everything is done in DirectX. Reasons to used Managed DirectX: You want to be able to do things on the fly with your graphics, in managed code; Reasons to Use DirectX: You are my Idol. If your going to be using c++ I would recoment Managed DirectX, you will be able to find a lot of resources. If C# Use XNA Lots of resources and samples.. ---Don't use XNA if you want to "Make" models... even Microsoft doesn't attempt to do this. If you only want to display models..(move em arround etc...) use XNA. If you wnat to blend between poses.. Use managed/unmanaged DirectX; I'd blame it on the Brain farts.. But lets be honest, it really is more like a Methane factory between my ears some days then it is anything else...