Width * Height

This is a discussion on Width * Height within the General Discussions forums, part of the Community Boards category; Just a quick question; What is english term of: Code: width * height In my dictionary it's: broad, vast, roomy, ...

  1. #1
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489

    Width * Height

    Just a quick question;

    What is english term of:
    Code:
    width * height
    In my dictionary it's: broad, vast, roomy, large, extent.

    Seems not right.


    Thanks in advance.

    EDIT: It's width multiplied by height.
    Just GET it OFF out my mind!!

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,176
    Area (of a rectangle)?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    DESTINY BEN10's Avatar
    Join Date
    Jul 2008
    Location
    in front of my computer
    Posts
    804
    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

  4. #4
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489
    Yeah, it's image.

    So
    Code:
    image.area = image.width * image.height
    ?
    Just GET it OFF out my mind!!

  5. #5
    Banned ಠ_ಠ's Avatar
    Join Date
    Mar 2009
    Posts
    687
    correct
    ╔╗╔══╦╗
    ║║║╔╗║║
    ║╚╣╚╝║╚╗
    ╚═╩══╩═╝

  6. #6
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489
    Thank you very much!
    Just GET it OFF out my mind!!

  7. #7
    Registered User
    Join Date
    Aug 2009
    Location
    USA
    Posts
    8
    Quote Originally Posted by audinue View Post
    Just a quick question;

    What is english term of:
    Code:
    width * height

    EDIT: It's width multiplied by height.
    It is what someone overweight like me must find out about a car before purchasing !
    Last edited by FrogFace; 09-01-2009 at 02:37 AM. Reason: modified joke to make sure friendly

  8. #8
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,075
    Quote Originally Posted by FrogFace View Post
    It is what someone overweight like me must find out about a car before purchasing !
    I think that'd more likely be volume...
    Sent from my iPadŽ

  9. #9
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489
    Very weird tough in this context...
    Code:
    rgba_t *image = imageObject.getBits();
    rgba_t *const imageEnd = image + imageObject.getArea();
    while(image < imageEnd)
    {
      image++;
    }
    I thought it would be:
    Code:
    rgba_t *const imageEnd = image + imageObject.geSize();
    EDIT:
    Code:
    rgba_t *const imageEnd = image + imageObject.geSize().getArea();
    Better?
    Just GET it OFF out my mind!!

  10. #10
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,075
    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Ž

  11. #11
    Registered User
    Join Date
    Aug 2009
    Location
    USA
    Posts
    8
    Quote Originally Posted by SlyMaelstrom View Post
    I think that'd more likely be volume...
    LOL, i stand corrected...

  12. #12
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489
    Quote Originally Posted by SlyMaelstrom View Post
    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.
    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!!

  13. #13
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,075
    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Ž

  14. #14
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489
    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 06:46 AM.
    Just GET it OFF out my mind!!

  15. #15
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    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

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  2. A bunch of Linker Errors...
    By Junior89 in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2006, 02:59 PM
  3. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 04:49 PM
  4. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 10:45 PM
  5. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 07:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21