void CPDF_TextObject::SetText(CFX_ByteString* pStrs, FX_FLOAT* pKerning, int nSegs) { SetSegments(pStrs, pKerning, nSegs); RecalcPositionData(); }
DENORM::DENORM(float x, // from same pieces float scaling, double line_m, // default line: y = mx + c double line_c, inT16 seg_count, // no of segments DENORM_SEG *seg_pts, // actual segments BOOL8 using_row, // as baseline ROW *src) { Init(); x_origin_ = x; // just copy y_origin_ = line_c; ASSERT_HOST(line_m == 0.0); x_scale_ = y_scale_ = scaling; SetSegments(seg_pts, seg_count); }
DENORM & DENORM::operator=(const DENORM & src) { Clear(); inverse_ = src.inverse_; pix_ = src.pix_; block_ = src.block_; row_ = src.row_; if (src.rotation_ == NULL) rotation_ = NULL; else rotation_ = new FCOORD(*src.rotation_); predecessor_ = src.predecessor_; SetSegments(src.segs_, src.num_segs_); x_origin_ = src.x_origin_; y_origin_ = src.y_origin_; x_scale_ = src.x_scale_; y_scale_ = src.y_scale_; final_xshift_ = src.final_xshift_; final_yshift_ = src.final_yshift_; return *this; }
// Initializes the denorm for a transformation. For details see the large // comment in normalis.h. // Arguments: // block: if not NULL, then this is the first transformation, and // block->re_rotation() needs to be used after the Denorm // transformation to get back to the image coords. // row: if not NULL, then row->baseline(x) is added to the y_origin, unless // segs is not NULL and num_segs > 0, in which case they are used. // rotation: if not NULL, apply this rotation after translation to the // origin and scaling. (Usually a classify rotation.) // predecessor: if not NULL, then predecessor has been applied to the // input space and needs to be undone to complete the inverse. // segs: if not NULL and num_segs > 0, then the segs provide the y_origin // and the y_scale at a given source x. // num_segs: the number of segs. // The above pointers are not owned by this DENORM and are assumed to live // longer than this denorm, except rotation, which is deep copied on input. // // x_origin: The x origin which will be mapped to final_xshift in the result. // y_origin: The y origin which will be mapped to final_yshift in the result. // Added to result of row->baseline(x) if not NULL. // // x_scale: scale factor for the x-coordinate. // y_scale: scale factor for the y-coordinate. Ignored if segs is given. // Note that these scale factors apply to the same x and y system as the // x-origin and y-origin apply, ie after any block rotation, but before // the rotation argument is applied. // // final_xshift: The x component of the final translation. // final_yshift: The y component of the final translation. void DENORM::SetupNormalization(const BLOCK* block, const ROW* row, const FCOORD* rotation, const DENORM* predecessor, const DENORM_SEG* segs, int num_segs, float x_origin, float y_origin, float x_scale, float y_scale, float final_xshift, float final_yshift) { Clear(); block_ = block; row_ = row; if (rotation == NULL) rotation_ = NULL; else rotation_ = new FCOORD(*rotation); predecessor_ = predecessor; SetSegments(segs, num_segs); x_origin_ = x_origin; y_origin_ = y_origin; x_scale_ = x_scale; y_scale_ = y_scale; final_xshift_ = final_xshift; final_yshift_ = final_yshift; }
static void DoLink( char *cmdline ) /**********************************/ // cmdline is only used when we are running under watfor. { #ifndef __OSI__ #ifdef __ZDOS__ signal( SIGBREAK, &TrapBreak ); /* so we can clean up */ #else signal( SIGINT, &TrapBreak ); /* so we can clean up */ #endif #endif StartTime(); DoCmdFile( cmdline ); CheckErr(); MapInit(); SetupFakeModule(); ProcObjFiles(); /* ObjPass1 */ CheckErr(); DoDefaultSystem(); if( LinkState & LIBRARIES_ADDED ) { FindLibPaths(); LinkState |= SEARCHING_LIBRARIES; ResolveUndefined(); LinkState &= ~SEARCHING_LIBRARIES; LinkState |= GENERATE_LIB_LIST; } ProcLocalImports(); DecideFormat(); SetFormat(); ConvertLazyRefs(); SetSegments(); CheckErr(); DefBSSSyms(); LinkFakeModule(); PreAddrCalcFormatSpec(); ReportUndefined(); CheckClassOrder(); CalcSegSizes(); SetStkSize(); AutoGroup(); CalcAddresses(); GetBSSSize(); GetStkAddr(); GetStartAddr(); PostAddrCalcFormatSpec(); #ifdef _RDOS if( FmtData.type & MK_RDOS ) GetRdosSegs(); #endif CheckErr(); InitLoadFile(); ObjPass2(); FiniMap(); CheckErr(); FiniLoadFile(); WritePermData(); BuildImpLib(); EndTime(); #ifndef __OSI__ #ifdef __ZDOS__ signal( SIGBREAK, SIG_IGN ); /* we're going to clean up anyway */ #else signal( SIGINT, SIG_IGN ); /* we're going to clean up anyway */ #endif #endif }
void CPDF_TextObject::SetText(const CFX_ByteString& str) { SetSegments(&str, nullptr, 1); RecalcPositionData(); }