Re: graphics mode 261 query

new topic     » goto parent     » topic index » view thread      » older message » newer message
eeel said...

than you greg

i will research what to do with the dos rescue package and hope that i understand the instructions

From my point of view, using Dos Graphics (even with Eu3.11) is not the way to go. Maybe you have fun playing arund with this.

include tinewg.exw 
 
WindowType=NoBorderWin          -- we need a window without borders 
atom X=ScreenWidth()            -- getting screen size X 
atom Y=ScreenHeight()           -- see above and Y 
Window("test",-1,-1,X,Y)        -- create the window (full screen centered) 
 
procedure paint() 
sequence coords 
coords=GetClientRect(WinHwnd)                   -- get the size of your working area {xmin,ymin,xmax,ymax} 
 SetCanvas(WinHwnd)                             -- Choose WinHwnd (the Main Window) to paint on 
 SetPenColor(CL_BLACK)                          -- Set Pen color and Brush Color (border and fillcolor) 
 DrawRectangle(0,0,coords[3],coords[4],True)    -- fill it with black 
 SetPenColor(CL_BLUE)                           -- Set border and fill color to blue 
 SetPenSize(5)                                  -- a five pixel Pen Size 
 DrawLine(0,0,coords[3],coords[4])              -- Draw a line from upper left to lower right 
 DrawLine(coords[3],0,0,coords[4])              -- again from upper right to lower left 
 SetPenSize(3)                                  -- new pensize just for fun 
 SetPenCol(CL_WHITE)                            -- now pen is white gives a white border around 
 SetBrushCol(MakeRGB(0,255,0))                  -- shows you can use any RGB Color not only the CL_XXX 
 DrawRectangle(100,100,150,150,True)            -- see above 
 SetBrushCol(CL_RED)                            -- again 
 DrawCircle(floor(X/2),floor(Y/2),200,True)     -- funny circle in the middle 
end procedure 
SetHandler(WinHwnd,Paint,routine_id("paint"))     -- repaint if needed 
 
procedure endapp() 
  CloseApp() 
end procedure 
SetHandler(WinHwnd,Click,routine_id("endapp"))    -- Close the App on a Mouse Click 
SetHandler(WinHwnd,Key,routine_id("endapp"))      -- Also close on Keyboard 
 
paint()  
 
WinMain() 
 

Andreas

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu