Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Method looking for name

This thread is locked; no one can reply to it. rss feed Print
Method looking for name
Polybios
Member #12,293
October 2010

Hi guys,

how would you call this simple method? I can't come up with something useful right now.
s can be both positive and negative.

Rectangle Rectangle::lookingForName(int s) const {
    return Rectangle(x() - s, y() - s, 
                     w() + 2*s, h() + 2*s);
}

Any suggestions much appreciated.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Elias
Member #358
May 2000

Rectangle::scale
Rectangle::resize
Rectangle::scaleBy
Rectangle::changeSize
Rectangle::resizeAllDirections
Rectangle::resizeKeepCenter
Rectangle::shrinkOrGrow

--
"Either help out or stop whining" - Evert

SiegeLord
Member #7,827
October 2006
avatar

Dilate, AddSquare (addition in the sense of https://en.wikipedia.org/wiki/Minkowski_addition).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Bruce Perry
Member #270
April 2000

Dilate is definitely the term I know from image editing software.

AddBorders is another possibility.

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Go to: