[poppler] Making OCG suppression be recursive

Carlos Garcia Campos carlosgc at gnome.org
Tue May 5 00:59:59 PDT 2009


El lun, 04-05-2009 a las 00:22 +0200, Albert Astals Cid escribió:
> Hi the attached patch adds that if we do a Begin Marked Content that is 
> suppressed and then we do a Begin Marked Content that is not suppressed 
> without closing the first one, the operations are still not drawn.
> 
> This fixes bug 16093, i think it's the correct way but as Carlos and Brad have 
> worked more on Optional Content i'd like some more input if possible (i know 
> i'm asking for much :-))

looks good to me. 

> Albert
> 
> 
> diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
> index 0eef5d3..b63d424 100644
> --- a/poppler/Gfx.cc
> +++ b/poppler/Gfx.cc
> @@ -4216,7 +4216,13 @@ void Gfx::pushMarkedContent() {
>  }
> 
>  GBool Gfx::contentIsHidden() {
> -  return mcStack && mcStack->ocSuppressed;
> +  MarkedContentStack *mc = mcStack;
> +  bool hidden = mc && mc->ocSuppressed;
> +  while (!hidden && mc && mc->next) {
> +    mc = mc->next;
> +    hidden = mc->ocSuppressed;
> +  }
> +  return hidden;
>  }
> 
>  void Gfx::opBeginMarkedContent(Object args[], int numArgs) {
> 
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
-- 
Carlos Garcia Campos
   elkalmail at yahoo.es
   carlosgc at gnome.org
   http://carlosgc.linups.org
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
 digitalmente
Url : http://lists.freedesktop.org/archives/poppler/attachments/20090505/f141e6d2/attachment.pgp 


More information about the poppler mailing list