this->info = info;
this->doc = doc;
this->xref = doc->getXRef();
-
+
this->jpeginfo = 0;
this->textmodeinfo = 0;
this->linkinfo = 0;
m.ty = (y0 + y1)/2 - 0.5;
device->fillgradient(device, &p1, g, gfxgradient_linear, &m);
+
+ free(g);
return gTrue;
}
if(this->pages) {
free(this->pages); this->pages = 0;
}
+ if(this->dashPattern) {
+ free(this->dashPattern);this->dashPattern = 0;
+ }
feature_t*f = this->featurewarnings;
while(f) {
void GFXOutputDev::updateLineDash(GfxState *state)
{
- state->getLineDash(&this->dashPattern, &this->dashLength, &this->dashStart);
+ if(this->dashPattern) {
+ free(this->dashPattern);this->dashPattern = 0;
+ }
+ double *pattern = 0;
+ state->getLineDash(&pattern, &this->dashLength, &this->dashStart);
msg("<debug> updateLineDash, %d dashes", this->dashLength);
if(!this->dashLength) {
this->dashPattern = 0;
+ } else {
+ double*p = (double*)malloc(this->dashLength*sizeof(this->dashPattern[0]));
+ memcpy(p, pattern, this->dashLength*sizeof(this->dashPattern[0]));
+ this->dashPattern = p;
}
}