Re: Basic basicgraphics question



The following bytes were arranged on 11 Jan 2011 by John Greenwood :

RECTANGLE FILL 0,0,1279,1023

I get a rectangle, which is black regardless what the first GCOL number
is, filling the bottom left quarter of the screen and a small white
rectangle of 4x4 pixels looking at the screen through a magnifier.

What am I missing?

All drawing calls take OS units, not pixels, to avoid problems in
rectangular-pixel screen modes.

Most screen modes these days have an x and y eigen-factor of 1, which is
the value the number of pixels needs to be shifted left by to give a
value in OS units.

See OS_ReadModeVariable for more information.

tl;dr version: Multiply by 2.

--
__<^>__ Follow me on Twitter! --> http://twitter.com/swirlythingy
/ _ _ \ (Or, um, don't. It's a free country and all that.)
( ( |_| ) )
\_> <_/ ======================= Martin Bazley ==========================
.



Relevant Pages

  • Re: Rectangle odd behavior
    ... you can see your rectangle passing through four of the ... >> To understand your rectangle's display behavior, ... >> of a rectangle with pixels can be considered as an approximation of an ... >> Since the width and height of a point is zero, measuring the size of ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Rectangle odd behavior
    ... To understand your rectangle's display behavior, ... idealized mathematical rectangle. ... Since the width and height of a point is zero, measuring the size of ... one technique of measuring the size of shapes displayed with pixels ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Basic roles of objects in iPhone app
    ... A COMPLETE lisitng of the code for an iPhone app uses a ... user pushes the button labeled "Red" the rectangle is moved 3 pixels to the ... When the user hits "Green" the rectangle is moved down 3 pixels and becomes ...
    (comp.sys.mac.programmer.help)
  • Himetric...yuck
    ... When using EMF files, when I create my DC, I am specifying a rectangle, and this ... rectangle needs to be in Himetric units. ... Interestingly enough, when I use API Draw functions, I can use pixels still. ... So, first, is there any way to make EMF files work in pixels only? ...
    (microsoft.public.vb.winapi.graphics)
  • Re: GraphicsPath size?
    ... this is for calculating the bounding rectangle. ... but still this gives you only the bounding box of the GraphicsPath. ... to get the exact size you'd need to know the number of pixels that fit ... picturebox), which is easy enough using a GraphicsPath.... ...
    (microsoft.public.dotnet.framework.drawing)