* beta: bug with transparent colors in fields
@ 2006-11-13 15:52 Peter Rolf
2006-11-14 18:10 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Peter Rolf @ 2006-11-13 15:52 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 697 bytes --]
Hi Hans,
the support of transparent colors in fields seems to be broken (beta
03.11.06). The attached example works with a non transparent
backgroundcolor, but breaks with a transparent one. Same behaviour on
ConTeXt Live.
\definecolor
[notebackgroundcolor]
% [s=.85]
[s=1,a=1,t=.9]
There is another problem with field activation (not in this example).
When the doc opens, the fields (region in/out) are kind of inactive.
Normally a tooltip note is shown/hidden, if the area is entered/left.
Only after "activating" the fields by pressing "R" and "H" in Acrobat,
they become alive. After that they work as expected. I am still working
on a minimal example for this case.
Greetings, Peter
[-- Attachment #2: note.tex --]
[-- Type: text/plain, Size: 3105 bytes --]
\setupoutput[pdf]
\setuppapersize[S6][S6]
\startJSpreamble {Notes} used now
var lastNote = "" ;
function Show_Note ( Name )
{ if (Name != lastNote)
{ Hide_Note () ;
var v = this.getField(Name) ; if (v)
{ console.println("Show Note: " + Name) ;
v.display = display.visible ;
v.readonly = false ;
% v.richText = true ;
% v.multiline = true ;
% v.lineWidth = 3 ;
% v.rect = [0, 0, 200, 150] ;
this.dirty = false ;
lastNote = Name } }
else {Hide_Note () ;}
}
function Hide_Note ( )
{ if (lastNote != "")
{ var v = this.getField(lastNote) ; if (v)
{ console.println("Hide Note: " + lastNote) ;
v.display = display.hidden ;
v.readonly = true ;
this.dirty = false } }
lastNote = "" }
function Set_Tooltip ( Name )
{ if (Name != "")
{ var v= this.getField(Name) ; if (v)
{ v.userName="This may help..." ; }
}
}
\stopJSpreamble
\newcounter\AnotherNote
\def\SomeNote#1#2%
{\hbox
{\doglobal\increment\AnotherNote
\definesymbol[note:\AnotherNote:on][\WhatANote{#2}]%
% \setupfield[notes][offset=overlay,frame=off,option={readonly,hidden}]
% this confuses acrobat, probably some interference bug, I spent too much time on that
\setupfield[notes][offset=overlay,frame=off,option={readonly,hidden},%
% regionin=JS(Hide_Note),
regionout=JS(Hide_Note),
username={Test!},
% clickin=JS(Hide_Note),
% clickout=JS(Hide_Note),
]
\definefield[note:\AnotherNote][check][notes][note:\AnotherNote:on,note:\AnotherNote:on][note:\AnotherNote:on]%
\doifreferencefoundelse{note:\AnotherNote}
{\setlayer[notes][page=\currentrealreference]{\fitfield[note:\AnotherNote]}}
{\setlayer[notes]{\fitfield[note:\AnotherNote]}}%
\pagereference[note:\AnotherNote]\goto{#1}[JS(Show_Note{note:\AnotherNote})]}}
\setupinteraction
[state=start,
openpageaction=JS(Hide_Note),
closepageaction=JS(Hide_Note)]
\definereference[CloseNote][JS(Hide_Note)]
\setupfootertexts[{\goto{Close Note}[CloseNote]}][]
\setupcolors
[state=start]
\definecolor
[notebackgroundcolor]
% [s=.85]
[s=1,a=1,t=.9]
\defineframedtext
[WhatANote]
[bodyfont=9pt,
background=color,
backgroundcolor=notebackgroundcolor,
width=.4\textwidth,
height=fit,
align=normal]
\definelayer
[notes]
[width=\paperwidth,
height=\paperheight,
preset=rightbottom,
offset=1cm]
\setupbackgrounds
[page]
[background={notes,foreground}]
\starttext
\startbuffer
\input ward \SomeNote{[[ward]]} {\input ward \relax} \input ward \blank
\input knuth \SomeNote{[[knuth]]} {\input knuth \relax} \input knuth \blank
\input tufte \SomeNote{[[tufte]]} {\input tufte \relax} \input tufte \blank
\input bryson \SomeNote{[[bryson]]}{\input bryson\relax} \input bryson \blank
\stopbuffer
\dorecurse{10}{\getbuffer}
\stoptext
[-- 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] 3+ messages in thread
* Re: beta: bug with transparent colors in fields
2006-11-13 15:52 beta: bug with transparent colors in fields Peter Rolf
@ 2006-11-14 18:10 ` Hans Hagen
2006-11-14 18:54 ` Peter Rolf
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2006-11-14 18:10 UTC (permalink / raw)
Peter Rolf wrote:
> Hi Hans,
>
> the support of transparent colors in fields seems to be broken (beta
> 03.11.06). The attached example works with a non transparent
> backgroundcolor, but breaks with a transparent one. Same behaviour on
> ConTeXt Live.
>
> \definecolor
> [notebackgroundcolor]
> % [s=.85]
> [s=1,a=1,t=.9]
>
> There is another problem with field activation (not in this example).
> When the doc opens, the fields (region in/out) are kind of inactive.
> Normally a tooltip note is shown/hidden, if the area is entered/left.
> Only after "activating" the fields by pressing "R" and "H" in Acrobat,
> they become alive. After that they work as expected. I am still working
> on a minimal example for this case.
>
> Greetings, Peter
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>
can you test the beta i'm uploading now?
--
-----------------------------------------------------------------
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] 3+ messages in thread
* Re: beta: bug with transparent colors in fields
2006-11-14 18:10 ` Hans Hagen
@ 2006-11-14 18:54 ` Peter Rolf
0 siblings, 0 replies; 3+ messages in thread
From: Peter Rolf @ 2006-11-14 18:54 UTC (permalink / raw)
Hans Hagen wrote:
> Peter Rolf wrote:
>> Hi Hans,
>>
>> the support of transparent colors in fields seems to be broken (beta
>> 03.11.06). The attached example works with a non transparent
>> backgroundcolor, but breaks with a transparent one. Same behaviour on
>> ConTeXt Live.
>>
>> \definecolor
>> [notebackgroundcolor]
>> % [s=.85]
>> [s=1,a=1,t=.9]
>>
>> There is another problem with field activation (not in this example).
>> When the doc opens, the fields (region in/out) are kind of inactive.
>> Normally a tooltip note is shown/hidden, if the area is entered/left.
>> Only after "activating" the fields by pressing "R" and "H" in Acrobat,
>> they become alive. After that they work as expected. I am still working
>> on a minimal example for this case.
>>
>> Greetings, Peter
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ntg-context mailing list
>> ntg-context@ntg.nl
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>>
> can you test the beta i'm uploading now?
>
Thanks Hans! Trasparency works again. The "inactive bug" still occurs
(but no minimal example yet).
Greetings, Peter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-11-14 18:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-13 15:52 beta: bug with transparent colors in fields Peter Rolf
2006-11-14 18:10 ` Hans Hagen
2006-11-14 18:54 ` Peter Rolf
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).