OSErr PISetRulerOrigin(const double horizontal, const double vertical) { OSErr error = sPSProperty->setPropertyProc(kPhotoshopSignature, propRulerOriginH, 0, DoubleToFixed(horizontal), NULL); if (!error) error = sPSProperty->setPropertyProc(kPhotoshopSignature, propRulerOriginV, 0, DoubleToFixed(vertical), NULL); return error; }
OSErr PISetBigNudge(const double horizontal, const double vertical) { OSErr error = sPSProperty->setPropertyProc(kPhotoshopSignature, propBigNudgeH, 0, DoubleToFixed(horizontal), NULL); if (!error) error = sPSProperty->setPropertyProc(kPhotoshopSignature, propBigNudgeV, 0, DoubleToFixed(vertical), NULL); return error; }
OSErr PISetGrid(const double major, const int32 minor) { OSErr error = sPSProperty->setPropertyProc(kPhotoshopSignature, propGridMajor, 0, DoubleToFixed(major), NULL); if (!error) error = sPSProperty->setPropertyProc(kPhotoshopSignature, propGridMinor, 0, minor, NULL); return error; }
extern void SendFloatData( NETFILE *fp, PacketDataType type, double val) { char buff[CLIENT_SIZE_BUFF]; GL_SendDataType(fp,type); switch (type) { case GL_TYPE_CHAR: case GL_TYPE_VARCHAR: case GL_TYPE_DBCODE: case GL_TYPE_TEXT: sprintf(buff,"%g",val); GL_SendString(fp,(char *)buff); break; #if 0 case GL_TYPE_NUMBER: xval = DoubleToFixed(val); GL_SendFixed(fp,xval); FreeFixed(xval); break; #endif case GL_TYPE_INT: GL_SendInt(fp,(int)val); break; case GL_TYPE_FLOAT: GL_SendFloat(fp,val); break; case GL_TYPE_BOOL: GL_SendBool(fp,(( val == 0 ) ? FALSE : TRUE )); break; default: printf(_("invalid data conversion\n")); exit(1); break; } }