generation,
54, m_Generation(generation)
55, m_AllowCompression(allowCompression)
56, m_DrawColor(0.0f, 0.0f, 0.0f, 1.0f)
57, m_DrawColorSet(
false)
58, m_FillColor(0.0f, 0.0f, 0.0f, 1.0f)
59, m_FillColorSet(
false)
61, m_PdfFilter(
eNone)
62, m_BitsPerCoord(e16Bit)
135 stringstr_pattern =
"[";
140 stringtrailing_num =
"";
143 boolis_on = (pattern&
mask) != 0;
144 intinitial_offset = 0;
147 for(
int i=0;
i<16; ++
i) {
148 if(((pattern&
mask)!=0) != is_on) {
150 int delta= (
i- start_bit)*factor;
153 if(start_bit == 0 && !is_on) {
157str_pattern +=
" "+ sval;
162is_on = ((pattern&
mask)!=0);
168 int delta= (16 - start_bit)*factor;
171str_pattern +=
" "+ sval;
173 if(trailing_num !=
"") {
174str_pattern +=
" "+ trailing_num;
175initial_offset = total;
178str_pattern +=
" ]";
211 const stringfontname = font_handler->
GetFontName(face);
231 for(
size_t i=0;
i<strlen(txt); ++
i) {
232 if(txt[
i] ==
'\\'|| txt[
i] ==
'('|| txt[
i] ==
')')
250 const stringfontname = font_handler->
GetFontName(face);
264 for(
size_t i=0;
i<strlen(txt); ++
i) {
265 if(txt[
i] ==
'\\'|| txt[
i] ==
'('|| txt[
i] ==
')')
283 if(verts.size() < 2)
288 for(
size_t i=1;
i<verts.size(); ++
i)
322 intshift = (
int)bits_per_coord;
338(*this)[
"ShadingType"] =
new CPdfNumber(4);
339(*this)[
"ColorSpace"] =
new CPdfName(
"DeviceRGB");
340(*this)[
"Decode"] =
new CPdfElement(
" [ "+ xyrange +
" 0 1 0 1 0 1 ]");
341(*this)[
"BitsPerComponent"] =
new CPdfNumber(8);
343(*this)[
"BitsPerFlag"] =
new CPdfNumber(8);
346(*this)[
"Filter"] =
new CPdfName(
"ASCIIHexDecode");
363 size_tdigits = (size_t)(bits/4);
370 for(
size_t i=
val.length();
i<digits; ++
i)
374 if(
val.length() > digits)
375 val=
val.substr(0, digits);
395 unsigned charef = (
unsignedchar)edge_flag;
397 unsigned shortsx = (
unsignedshort)p1.
X();
399 unsigned shortsy = (
unsignedshort)p1.
Y();
409sx = (
unsignedshort)p2.
X();
411sy = (
unsignedshort)p2.
Y();
421sx = (
unsignedshort)p3.
X();
423sy = (
unsignedshort)p3.
Y();
437 if(ehex.length() == 1)
454 unsigned charef = (
unsignedchar)edge_flag;
456 unsigned shortsx = (
unsignedshort)p1.
X();
458 unsigned shortsy = (
unsignedshort)p1.
Y();
470 if(ehex.length() == 1)
495stream <<
"endobj"<< endl;
508 const size_tcbuflen = size_t(os_len * 1.03);
520 const size_tbuflen = size_t(
len* 1.3);
521strmbuf.
reset(
new char[buflen]);
540stream <<
"stream"<< endl;
544 const unsigned intline_len = 72;
545 const char* ptr = strmbuf.
get();
547 for( ;
l> line_len;
l-= line_len, ptr += line_len) {
548stream.write(ptr, line_len) <<
pdfeol;
550stream.write(ptr,
l) <<
pdfeol;
557 #ifndef NCBI_SHUN_OSTRSTREAM 564stream <<
"endstream"<< endl;
600stream <<
"trailer"<< endl;
ncbi::TMaskedQueryRegions mask
static size_t s_Encode(const char *src_buf, size_t src_len, char *dst_buf, size_t dst_len)
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
string GetFontName(EFontFace fontface) const
CPdfObject(unsigned int obj_num, unsigned int generation=0, bool allowCompression=false)
void PushGraphicsState()
gs
string x_GetHex(double f)
Convert floating point values into hexidecimal based on the current range and m_BitsPerCood.
CNcbiOstream & GetWriteBuffer(void)
void SetLineDashStyle(int factor, short pattern)
CPdfDictionary m_Dictionary
CRgbaColor m_DrawColor
Current State.
virtual string GetSeparator(void) const
void Tri(CVect2< float > &p1, CVect2< float > &p2, CVect2< float > &p3)
void StartTris(EPdfFilter filter, EBitCount bits_per_coord, int range_minx, int range_maxx, int range_miny, int range_maxy)
double m_PositionMultX
multipliers for vertex values based on ratio of range max value
void Line(CVect2< float > &p1, CVect2< float > &p2)
virtual void PrintTo(CNcbiOstream &stream) const
CPdfDictionary & GetDictionary(void)
void SetLineCapStyle(int cap_style)
unsigned int GetObjNum(void) const
unsigned int GetGeneration(void) const
void Text(CRef< CPdfFontHandler > font_handler, EFontFace face, float font_size, CVect2< float > &p, const char *txt)
CPdfObject & operator<<(CPdfObject &(*pf)(CPdfObject &))
void SetClipBox(int x, int y, int width, int height)
EPdfFilter m_PdfFilter
Current triangle rendering parameters.
void SetFillColor(const CRgbaColor &c)
rg
void x_PrintTo(CNcbiOstream &stream)
void SetGraphicsState(const string &state)
void SetColor(const CRgbaColor &c)
RG.
unsigned int m_Generation
void Poly(vector< CVect2< float > > &verts)
void SetLineJoinStyle(int join_style)
void Quad(CVect2< float > &p1, CVect2< float > &p2, CVect2< float > &p3, CVect2< float > &p4)
void SetLineWidth(float w)
TPdfEltRef & operator[](const string &key)
virtual void PrintTo(CNcbiOstream &stream) const
class CRgbaColor provides a simple abstraction for managing colors.
static const char * str(char *buf, int n)
void reset(element_type *p=0, EOwnership ownership=eTakeOwnership)
Reset will delete the old pointer (if owned), set content to the new value, and assume the ownership ...
element_type * get(void) const
Get pointer.
virtual bool CompressBuffer(const void *src_buf, size_t src_len, void *dst_buf, size_t dst_size, size_t *dst_len)
Compress data in the buffer.
EFontFace
Set of pre-defined fonts for which we know we have valid font files.
unsigned char GetRedUC(void) const
Get specific channels in unsigned char values.
float GetBlue(void) const
float GetGreen(void) const
unsigned char GetGreenUC(void) const
unsigned char GetBlueUC(void) const
float GetRed(void) const
Get specific channels in floating point values.
int64_t Int8
8-byte (64-bit) signed integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Int8 GetOssSize(CNcbiOstrstream &oss)
static string Int8ToString(Int8 value, TNumToStringFlags flags=0, int base=10)
Convert Int8 to string.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
unsigned int
A callback function used to compare two keys in a database.
const struct ncbi::grid::netcache::search::fields::KEY key
Int4 delta(size_t dimension_, const Int4 *score_)
CNcbiOstream & pdfeol(CNcbiOstream &strm)
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4