ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* clipping problem
@ 2006-07-03 19:55 Peter Rolf
  2006-07-06  9:54 ` Peter Rolf
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Rolf @ 2006-07-03 19:55 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

Hi,

I have some png-graphics, where several (equal sized) icons are arranged
in array form. When I cut out an icon, I get the icon gfx plus a very
small part from the surronding icon(s). The attached file shows, that
the same problem occurs when using a vector based graphic.

Normally I use imagemagic to seperate such files into single gfx, so
this is not a serious problem for me. But if this is a bug, it should be
fixed (or if I have missed something, let me know).

Greetings, Peter

[-- Attachment #2: cliptest.tex --]
[-- Type: text/plain, Size: 888 bytes --]

% interface=en output=pdftex
% Time-stamp: <Montag, 03 Juli 2006 21:04:46; cliptest.tex>
%

\setupcolors[state=start]

\startreusableMPgraphic{cliptest}
  path p ;
  u:= 64bp ;
  p:= unitsquare xyscaled(u,u) ;

  fill p withcolor green ;
  fill p xshifted u  withcolor blue ;
  fill p xshifted 2u withcolor green ;

  fill p yshifted u     withcolor blue ;
  fill p shifted (u,u)  withcolor red ;
  fill p shifted (2u,u) withcolor blue ;

  fill p shifted (0,2u)  withcolor green ;
  fill p shifted (u,2u)  withcolor blue ;
  fill p shifted (2u,2u) withcolor green ;
\stopreusableMPgraphic


\starttext

\reuseMPgraphic{cliptest}
\blank

\setupclipping[nx=3,ny=3]

\clip[x=1,y=1]{\reuseMPgraphic{cliptest}}
\blank

\clip[x=2,y=2]{\reuseMPgraphic{cliptest}}
\blank

\clip[x=2,y=3]{\reuseMPgraphic{cliptest}}



\stoptext

%%% Local Variables:
%%% mode: context
%%% TeX-master: ""
%%% End:

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: clipping problem
  2006-07-03 19:55 clipping problem Peter Rolf
@ 2006-07-06  9:54 ` Peter Rolf
  2006-07-10 18:28   ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Rolf @ 2006-07-06  9:54 UTC (permalink / raw)


Just as a reminder for an unsolved problem :)

I also tested this on contextgarden, with faulty result. Same with

\clip[hoffset=64bp,voffset=64bp,width=64bp,height=64bp]{\reuseMPgraphic{cliptest}}

So it doesn't look like a rounding problem.

Peter Rolf wrote:
> Hi,
> 
> I have some png-graphics, where several (equal sized) icons are arranged
> in array form. When I cut out an icon, I get the icon gfx plus a very
> small part from the surronding icon(s). The attached file shows, that
> the same problem occurs when using a vector based graphic.
> 
> Normally I use imagemagic to seperate such files into single gfx, so
> this is not a serious problem for me. But if this is a bug, it should be
> fixed (or if I have missed something, let me know).
> 
> Greetings, Peter
> 
> 
> ------------------------------------------------------------------------
> 
> % interface=en output=pdftex
> % Time-stamp: <Montag, 03 Juli 2006 21:04:46; cliptest.tex>
> %
> 
> \setupcolors[state=start]
> 
> \startreusableMPgraphic{cliptest}
>   path p ;
>   u:= 64bp ;
>   p:= unitsquare xyscaled(u,u) ;
> 
>   fill p withcolor green ;
>   fill p xshifted u  withcolor blue ;
>   fill p xshifted 2u withcolor green ;
> 
>   fill p yshifted u     withcolor blue ;
>   fill p shifted (u,u)  withcolor red ;
>   fill p shifted (2u,u) withcolor blue ;
> 
>   fill p shifted (0,2u)  withcolor green ;
>   fill p shifted (u,2u)  withcolor blue ;
>   fill p shifted (2u,2u) withcolor green ;
> \stopreusableMPgraphic
> 
> 
> \starttext
> 
> \reuseMPgraphic{cliptest}
> \blank
> 
> \setupclipping[nx=3,ny=3]
> 
> \clip[x=1,y=1]{\reuseMPgraphic{cliptest}}
> \blank
> 
> \clip[x=2,y=2]{\reuseMPgraphic{cliptest}}
> \blank
> 
> \clip[x=2,y=3]{\reuseMPgraphic{cliptest}}
> 
> 
> 
> \stoptext
> 
> %%% Local Variables:
> %%% mode: context
> %%% TeX-master: ""
> %%% End:
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: clipping problem
  2006-07-06  9:54 ` Peter Rolf
@ 2006-07-10 18:28   ` Hans Hagen
  2006-07-10 19:05     ` Peter Rolf
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2006-07-10 18:28 UTC (permalink / raw)


Peter Rolf wrote:
> Just as a reminder for an unsolved problem :)
>
> I also tested this on contextgarden, with faulty result. Same with
>
> \clip[hoffset=64bp,voffset=64bp,width=64bp,height=64bp]{\reuseMPgraphic{cliptest}}
>
> So it doesn't look like a rounding problem.
>   
this clips ok here (only one color-clips) so maybe a viewer problem?
> Peter Rolf wrote:
>   
>> Hi,
>>
>> I have some png-graphics, where several (equal sized) icons are arranged
>> in array form. When I cut out an icon, I get the icon gfx plus a very
>> small part from the surronding icon(s). The attached file shows, that
>> the same problem occurs when using a vector based graphic.
>>
>> Normally I use imagemagic to seperate such files into single gfx, so
>> this is not a serious problem for me. But if this is a bug, it should be
>> fixed (or if I have missed something, let me know).
>>
>> Greetings, Peter
>>
>>
>> ------------------------------------------------------------------------
>>
>> % interface=en output=pdftex
>> % Time-stamp: <Montag, 03 Juli 2006 21:04:46; cliptest.tex>
>> %
>>
>> \setupcolors[state=start]
>>
>> \startreusableMPgraphic{cliptest}
>>   path p ;
>>   u:= 64bp ;
>>   p:= unitsquare xyscaled(u,u) ;
>>
>>   fill p withcolor green ;
>>   fill p xshifted u  withcolor blue ;
>>   fill p xshifted 2u withcolor green ;
>>
>>   fill p yshifted u     withcolor blue ;
>>   fill p shifted (u,u)  withcolor red ;
>>   fill p shifted (2u,u) withcolor blue ;
>>
>>   fill p shifted (0,2u)  withcolor green ;
>>   fill p shifted (u,2u)  withcolor blue ;
>>   fill p shifted (2u,2u) withcolor green ;
>> \stopreusableMPgraphic
>>
>>
>> \starttext
>>
>> \reuseMPgraphic{cliptest}
>> \blank
>>
>> \setupclipping[nx=3,ny=3]
>>
>> \clip[x=1,y=1]{\reuseMPgraphic{cliptest}}
>> \blank
>>
>> \clip[x=2,y=2]{\reuseMPgraphic{cliptest}}
>> \blank
>>
>> \clip[x=2,y=3]{\reuseMPgraphic{cliptest}}
>>
>>
>>
>> \stoptext
>>
>> %%% Local Variables:
>> %%% mode: context
>> %%% TeX-master: ""
>> %%% End:
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ntg-context mailing list
>> ntg-context@ntg.nl
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>>     
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>   


-- 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: clipping problem
  2006-07-10 18:28   ` Hans Hagen
@ 2006-07-10 19:05     ` Peter Rolf
  2006-07-10 20:06       ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Rolf @ 2006-07-10 19:05 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 2942 bytes --]

Hans Hagen wrote:
> Peter Rolf wrote:
>> Just as a reminder for an unsolved problem :)
>>
>> I also tested this on contextgarden, with faulty result. Same with
>>
>> \clip[hoffset=64bp,voffset=64bp,width=64bp,height=64bp]{\reuseMPgraphic{cliptest}}
>>
>> So it doesn't look like a rounding problem.
>>   
> this clips ok here (only one color-clips) so maybe a viewer problem?

I attached the final pdf and a screenshot out of acrobat viewer (v7.08,
Win XP) at 300%. If you zoom the screenshot at the top/right edges of
the clipped boxes, you can clearly see that there is something wrong.
Maybe a viewer problem, as 'foxit reader' shows the same glitches at
lower zoomlevel, but not at higher zoomlevel. Acrobat Viewer shows them
even at 6400%. Mhh, I will test this on another computer.

Thanks anyway,

Peter


>> Peter Rolf wrote:
>>
>>> Hi,
>>>
>>> I have some png-graphics, where several (equal sized) icons are arranged
>>> in array form. When I cut out an icon, I get the icon gfx plus a very
>>> small part from the surronding icon(s). The attached file shows, that
>>> the same problem occurs when using a vector based graphic.
>>>
>>> Normally I use imagemagic to seperate such files into single gfx, so
>>> this is not a serious problem for me. But if this is a bug, it should be
>>> fixed (or if I have missed something, let me know).
>>>
>>> Greetings, Peter
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> % interface=en output=pdftex
>>> % Time-stamp: <Montag, 03 Juli 2006 21:04:46; cliptest.tex>
>>> %
>>>
>>> \setupcolors[state=start]
>>>
>>> \startreusableMPgraphic{cliptest}
>>>   path p ;
>>>   u:= 64bp ;
>>>   p:= unitsquare xyscaled(u,u) ;
>>>
>>>   fill p withcolor green ;
>>>   fill p xshifted u  withcolor blue ;
>>>   fill p xshifted 2u withcolor green ;
>>>
>>>   fill p yshifted u     withcolor blue ;
>>>   fill p shifted (u,u)  withcolor red ;
>>>   fill p shifted (2u,u) withcolor blue ;
>>>
>>>   fill p shifted (0,2u)  withcolor green ;
>>>   fill p shifted (u,2u)  withcolor blue ;
>>>   fill p shifted (2u,2u) withcolor green ;
>>> \stopreusableMPgraphic
>>>
>>>
>>> \starttext
>>>
>>> \reuseMPgraphic{cliptest}
>>> \blank
>>>
>>> \setupclipping[nx=3,ny=3]
>>>
>>> \clip[x=1,y=1]{\reuseMPgraphic{cliptest}}
>>> \blank
>>>
>>> \clip[x=2,y=2]{\reuseMPgraphic{cliptest}}
>>> \blank
>>>
>>> \clip[x=2,y=3]{\reuseMPgraphic{cliptest}}
>>>
>>>
>>>
>>> \stoptext
>>>
>>> %%% Local Variables:
>>> %%% mode: context
>>> %%% TeX-master: ""
>>> %%% End:
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> ntg-context mailing list
>>> ntg-context@ntg.nl
>>> http://www.ntg.nl/mailman/listinfo/ntg-context
>>>     
>> _______________________________________________
>> ntg-context mailing list
>> ntg-context@ntg.nl
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>>   
> 
> 


[-- Attachment #2: cliptest.7z --]
[-- Type: application/octet-stream, Size: 16156 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: clipping problem
  2006-07-10 19:05     ` Peter Rolf
@ 2006-07-10 20:06       ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2006-07-10 20:06 UTC (permalink / raw)


Peter Rolf wrote:
> Hans Hagen wrote:
>   
>> Peter Rolf wrote:
>>     
>>> Just as a reminder for an unsolved problem :)
>>>
>>> I also tested this on contextgarden, with faulty result. Same with
>>>
>>> \clip[hoffset=64bp,voffset=64bp,width=64bp,height=64bp]{\reuseMPgraphic{cliptest}}
>>>
>>> So it doesn't look like a rounding problem.
>>>   
>>>       
>> this clips ok here (only one color-clips) so maybe a viewer problem?
>>     
>
> I attached the final pdf and a screenshot out of acrobat viewer (v7.08,
> Win XP) at 300%. If you zoom the screenshot at the top/right edges of
> the clipped boxes, you can clearly see that there is something wrong.
> Maybe a viewer problem, as 'foxit reader' shows the same glitches at
> lower zoomlevel, but not at higher zoomlevel. Acrobat Viewer shows them
> even at 6400%. Mhh, I will test this on another computer.
>   
it's a viewer problem; has to do with clippath going though middle of line and such 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-07-10 20:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-03 19:55 clipping problem Peter Rolf
2006-07-06  9:54 ` Peter Rolf
2006-07-10 18:28   ` Hans Hagen
2006-07-10 19:05     ` Peter Rolf
2006-07-10 20:06       ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).