示例#1
0
void scrollString(char string1[], char string2[]){

	while(1){

	line1Cursor();
	writeString(string1);

	line2Cursor();
	writeString(string2);

	string1 = rotateString(string1);
	string2 = rotateString(string2);

	/*string1++;
	//there is a 0 (null) at the end of the string
	//this sees the null and resets the string.
	if(*string1 == 0){
		string1 = line1strg;
		}

	string2++;
		if(*string2 == 0){
		string2 = line2strg;
	}*/
		//delays the next shift by 100ms
    __delay_cycles(102000);
	}
}
void rotate(char *st, int k) {
    if (st == NULL)
        return;
    int len = strlen(st);
    rotateString(st, 0, len-1);
    rotateString(st, 0, k-1);
    rotateString(st, k, len-1);
}
bool rspfImageViewAffineTransform::loadState(const rspfKeywordlist& kwl,
                                              const char* prefix)
{
   rspfString scaleString(kwl.find(prefix,"scale"));
   rspfString pivotString(kwl.find(prefix,"pivot"));
   rspfString translateString(kwl.find(prefix,"translate"));
   rspfString rotateString(kwl.find(prefix,"rotate"));
   
   if(!scaleString.empty())
   {
      m_scale.toPoint(scaleString);
   }
   if(!pivotString.empty())
   {
      m_pivot.toPoint(pivotString);
   }
   if(!translateString.empty())
   {
      m_translate.toPoint(translateString);
   }
   if(!rotateString.empty())
   {
      m_rotation = rotateString.toDouble();
   }
   buildCompositeTransform();
   rspfImageViewTransform::loadState(kwl, prefix);
   return true;
}
示例#4
0
文件: View.cpp 项目: OKaluza/LavaVu
void View::print()
{
  float xrot, yrot, zrot;
  rotation->toEuler(xrot, yrot, zrot);
  printf("------------------------------\n");
  printf("Viewport %d,%d %d x %d\n", xpos, ypos, width, height);
  printf("Clip planes: near %f far %f\n", (float)properties["near"], (float)properties["far"]);
  printf("Model size %f dims: %f,%f,%f - %f,%f,%f (scale %f,%f,%f)\n",
         model_size, min[0], min[1], min[2], max[0], max[1], max[2], scale[0], scale[1], scale[2]);
  printf("Focal Point %f,%f,%f\n", focal_point[0], focal_point[1], focal_point[2]);
  printf("------------------------------\n");
  printf("%s\n", translateString().c_str());
  printf("%s\n", rotateString().c_str());
  printf("------------------------------\n");
}