Rectangle.Inflate

  • Thread starter Thread starter Guest
  • Start date Start date
Inflate is just a convenience method. You can always create a new
rectangle. I think the reason it's included is to simplify hit testing.
 
Use negative numbers for the inflate values to deflate the rectangle.

Byron Cullen
ThunderTools
 
Hi,
Then maybe its a bad name for a method. it should be rescale() or
something.
Maybe, but it changes the size and location of the rectangle. Thus, names as
rescale or resize are not completely correct as well, I think.

B\rgds
100
 
Transform() then
100 said:
Hi,
something.
Maybe, but it changes the size and location of the rectangle. Thus, names as
rescale or resize are not completely correct as well, I think.

B\rgds
100
 
* "100 said:
Maybe, but it changes the size and location of the rectangle. Thus, names as
rescale or resize are not completely correct as well, I think.

Mhm... Scaling changes the position too, doesn't it? It depends on what
is scaled, I know.
 
Herfried K. Wagner said:
Mhm... Scaling changes the position too, doesn't it? It depends on what
is scaled, I know.

Maybe. I will expect to specify percentage of scaling, though.
rect.Scale(150) or rect.Scale(1.5)

I don't know. I think Inflate is OK. I kind of believe that having a
complementary Deflate or Shirnk method is not as great ideia as it sounds .
Windows API doesn't have Deflate, MFC CRect has but Inflate and Deflate do
the same work the difference is in the sign of the parameters which we have
to use to get the same result I found it little bit confusing. So I believe
it's better to have only one method. I'm cool with that name. Method with
the same name that do the same kind of work can be found in almost any
framework or graphics library.

B\rgds
100
 
* "Alvin Bruney said:
Ok how about we name it after me :D

Alvin()

Do some research, write some papers about it and maybe the'll name it
after you.

;-)
 
Back
Top