CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

GLCD and Graphics

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Markdem



Joined: 24 Jun 2005
Posts: 206

View user's profile Send private message Send e-mail

GLCD and Graphics
PostPosted: Thu Sep 15, 2011 9:36 pm     Reply with quote

Hi everyone,

I need to be able to draw icons on a glcd (KS0108) screen that are 11 x 11 pixels. I can draw icons fine is they are in multiples of 8, but I simply can't get my head around odd sizes.

I have tried the following code found here http://www.ccsinfo.com/forum/viewtopic.php?t=20912&highlight=bitmap

Code:

void glcd_sprite(int8 col, lig , x , y , int16 adresse)
{
   int8  *p;
   int8 i, j, data;
   int16 temp;


   for(i=0; i<lig; ++i)
   {
      temp =  y + i;
      temp *= 64;
      temp += x;
      for(j=0; j<col; ++j)
      {
         p = temp + j;
         if(x + j > 63)
         {
           p += displayData.right - 64;
         }
         else
         {
           p += displayData.left;
         }
         *p = image[i++];
      }

   }
}



Problem with that code is it will not allow me to position the image where ever I want on the y axis.

I guess my question is, has anyone got a function to display oddball image sized images on a GLCD??

Thanks

Mark
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Tue Sep 20, 2011 1:31 pm     Reply with quote

You may be able to run the graphic through fontgen to reorganize the data.
http://www.8052.com/users/bahrio/fontgen.phtml
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group