Re: Covering rectangles in 2D



On 2008-03-22, quasi <quasi@xxxxxxxx> wrote:
when you visit a cell, checking whether or not that cell is occupied
is not O(1).

It is O(1). I'm not checking from scratch whether a cell is occupied.
I'm checking the *difference* between coverage of it and the
preceding, neighbouring cell.

Because every grid line (and hence boundary between grid cells) is
generated by a known rectangle, that is the only rectangle I need to
examine.


- Tim
.



Relevant Pages

  • RE: Help with developing sudoku gui using GDI+
    ... x/y mouse coordinates to indices in your array. ... Let's assume that your grid ... information like the number that is already filled in on the cell. ... the selected rectangle. ...
    (microsoft.public.dotnet.framework.drawing)
  • Help with developing sudoku gui using GDI+
    ... I am trying to develop a sudoku solver, I have done in VB6 already(80% ... I used Rectangle Classes to create them and also Region ... I will draw them on onpaint event. ... the mouse is moved over any cell, i want to highlight that cell with a ...
    (microsoft.public.dotnet.framework.drawing)
  • Invalidating: rectangles or regions
    ... only know about a bounding rectangle. ... potentially has to get done to draw each grid cell. ... I override OnPaintin this user control and dump out the clip ... The same is for .NET if you invalidate a region the Paint event args contain ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Code to change the color of "Rectangle21_Click"
    ... Why not skip the rectangle and use the Change event or the calculate event ... to change the background color of a cell since you are exceeding the ... You can unprotect the sheet in your code and change the background color, ... the password with the protect command. ...
    (microsoft.public.excel.programming)
  • java.beans.PropertyEditor.paintValue() from JComponent.paintComponent()?
    ... I am attempting to put together a property sheet using a ... I understand the cell rendering and cell editing mechanics very well. ... As I understand it, PropertyEditor.paintValue(Graphics, Rectangle) is ...
    (comp.lang.java.gui)