Coding question - Align image on the screen


hello all! new forum , c+ please gentle me.

i have open source code written 3.2" tft lcd screen iphone buttons on it. able install code on arduino 2650 mega , see on 7" tft lcd screen in top left corner. point of using code make sure written correctly , linked correct pins. want show images in center of 7" screen cant figure out life of me correct coordinates.  code below loads sample images fine in top left corner (landscape). how find out coordinates of location want show images? screen 800 x 480. logo image 378x268 , copy image 149 x 47.


code: [select]
void setup()
{
  randomseed(analogread(0));
 
  // setup lcd
  myglcd.initlcd(0);
  myglcd.setfont(smallfont);
 
  // init sd card
  file.setsspin(53);
  file.initfat(spispeed_veryhigh); 
 
  // clear screen
  myglcd.clrscr();

  // boot logo
  myfiles.loadbitmap(26, 80, 188, 72, "logo.raw");
  myfiles.loadbitmap(53, 188, 134, 25, "copy.raw");
  delay(3000); 
}



any appreciated.

figures... ask of sudden figure out. of need this, here answer.

parameters:
x: x-coordinate of upper, left corner of bitmap
y: y-coordinate of upper, left corner of bitmap
sx: width of bitmap in pixels
sy: height of bitmap in pixels
filename: name of bitmap

usage:
myfiles.loadbitmap(x, y, sx, sy, "imagename.raw");


Arduino Forum > Using Arduino > Programming Questions > Coding question - Align image on the screen


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code