Just a quick question;
What is english term of:
In my dictionary it's: broad, vast, roomy, large, extent.Code:width * height
Seems not right.
Thanks in advance.
EDIT: It's width multiplied by height.
Just a quick question;
What is english term of:
In my dictionary it's: broad, vast, roomy, large, extent.Code:width * height
Seems not right.
Thanks in advance.
EDIT: It's width multiplied by height.
Just GET it OFF out my mind!!
Area (of a rectangle)?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
It'll definitely be area of a rectangle.
HOPE YOU UNDERSTAND.......
By associating with wise people you will become wise yourself
It's fine to celebrate success but it is more important to heed the lessons of failure
We've got to put a lot of money into changing behavior
PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D.
IDE- Microsoft Visual Studio 2008 Express Edition
Yeah, it's image.
So?Code:image.area = image.width * image.height
Just GET it OFF out my mind!!
Thank you very much!
Just GET it OFF out my mind!!
Very weird tough in this context...
I thought it would be:Code:rgba_t *image = imageObject.getBits(); rgba_t *const imageEnd = image + imageObject.getArea(); while(image < imageEnd) { image++; }
EDIT:Code:rgba_t *const imageEnd = image + imageObject.geSize();
Better?Code:rgba_t *const imageEnd = image + imageObject.geSize().getArea();
Just GET it OFF out my mind!!
What is imageObject? It's kind of hard to speculate on how to call a method of an object without knowing its type. However, intuitively, there doesn't seem anything wrong with the first call... structurally they could all be wrong, though, for all I know.
Sent from my iPadŽ
Image object is...
Hell an instance of Image class which encapsulate image behaviours and properties, including low level image's raw data (linear array of bit -- getBits) which type unsigned char *, in this case it's RGBA color model image, so actually we need to cast it to rgba_t *.
And then to retrieve the end of image array we need to multiply width by height and is encapsulated in getArea method.
OK, stop!
We won't dig this example into deeper details.
Just GET it OFF out my mind!!
Yeah, I assumed that much... however, I still couldn't suggest which of your examples is correct without seeing some class structures. If getArea is a method of class Image, then I'm sure the first example is fine. However, if getArea is, in fact, a method of another class that is returned by geSize, then the second example would be correct...
All in all... I don't really understand what you're asking. If these are your classes then why are you asking up how to call their methods?
Sent from my iPadŽ
Sorry for this misunderstanding..
I'm not asking how to call it but the name of method.
At #9, please look before the EDIT line.
Would it be getArea or getSize?
Since in low level term I think size would be more appropiate to describe width * height (that's size of array).
While in high level term, size contains both width and height, not width * height -- in this case what you guys tell me, area.
EDIT:
I got something to solve this naming method.
I think I will decoupling the Image class from ImageData class which have getSize method and Dimension which have getArea method. It's complex! Yeah!
Last edited by audinue; 09-01-2009 at 05:46 AM.
Just GET it OFF out my mind!!
Going with the way I have seen image files most often described, I think a normal english speaking programmer would assume this:
"size" would refer to the file size, eg in kB.
"area" would refer to width * height
"dimension" would refer to one of width or height (width is a dimension, height is a dimension).
So I don't know if having getArea as a sub-method of getSize is so appropriate...but not a big deal.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge