Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
N

ntrceptr

@ntrceptr
About
Posts
2
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Multithreaded drawing
    N ntrceptr

    Flickering is a sign that it is not doublebuffered or you are drawing on the wrong surface or flipping too soon. Double buffering is: Create a primary surface with one backbuffer (essentially 2 display surfaces) Always draw on the backbuffer (it is not visible) and when all drawing is complete swap the 2 surfaces. the swapping makes the backbuffer the primary and the primary becomes the backbuffer this is what prevents flickering, the instantanious swap of the source display surface. I haven't used the above drawing methods only DirectX and some GDI so i could be totally wrong about your code. It appears you are creating/initializing your drawing surfaces (this.CreateGraphics()) repeatedly....this should only be done once. - Where does it create your drawing surface Doublebuffered? - How does x.DrawLine know which surface of X to draw on? I also see "new" several times within you while(true) loop but no "delete" unless their is some sort of garbage collection for memory eventually you'll run out. Another issue you could have is since the drawing is in it's own thread....when the main form/window needs to refresh, it needs to know what to draw (the primary surface) or let the drawing thread know it needs to refresh the display area that it is handling. Hope this helped.

    C# graphics design help question

  • Gods Of COBOL
    N ntrceptr

    Dougs' replay was the closest thing to correct so far. 01 MEMORY-AREA-ONE PIC X(2816). This just defines a 2816 byte vaariable and the PIC X means it's alphanumeric 01 REDEFINES MEMORY-AREA-ONE This says your going to redefine that chunk of data into a different structure/layout 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. These 2 lines make an array of 37 four digit numbers (0000-9999) and gives you a subscript named K01-1-X to reference entries 1-37 remember COBOL subscripts start at 1 not zero. This K01-1 array actually exists in the first 74 bytes of MEMORY-AREA-ONE The COMP-5 or any COMP in COBOL basicall says to save space by representing the numbers in memory (like they should) in a binary format. COBOL will basically use a string for numbers is you don't use COMP (1 byte for each digit) 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5. This is basically the same except it uses bytes 75-2812 of MEMORY-AREA-ONE to define and array of 1369 four digit numbers and gives you subscript K02-1-X to reference it. I'd say the original author didn't quite understand COBOL either as you dont need to define extra space in the MEMORY-AREA-ONE for the subscripts. if it was 01 MEMORY-AREA-ONE PIC X(2812) it would have worked the same.

    The Lounge com performance question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups