• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Highlighter tool
#1
Hi Mike,
I've noticed the highlighter tool draws it's lines by covering up what is in the background, instead of being transparent like a true highlighter. 
I know we can set it's transparency level so it becomes a bit transparent, but doing so we loose half of the colour of the line, and the background becomes a bit less contrasted.
In drawing apps as Photoshop the highlighter effect is made by setting overlapping mode to "multiply", so that every level can maintain full colour and contrast even if they are set to 100% opacity. Do you think it would be possible also in MSP?
Marco

Samsung Galaxy Note Pro 12,2" - Nord Stage 2 HA88
Reply
#2
I agree with mcrossy. That's an important disadvantage of MSPs highlighter tool.
Sometimes I use the highlighter of my PDFReader that has "multiply mode" and highlight directly in the PDF losing all of MSPs flexibility.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 1803
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#3
It's definitely something I want to do, and I've tried to explore how to do it, but I haven't found anything that has worked so far. I've tried changing the way the painting of the highlighter works on Android by utilizing different PorderDuff Xfermode values, but no matter what I try, the drawing either goes on top of the image or behind it. So that approach doesn't seem to be sufficient unless I'm doing something wrong. That leads me to believe I have to modify the pixels behind on the content on the page myself instead of relying on a blending/multiplying technique. Having to modify the pixel values of the bitmap representing the page is not the simplest thing when dealing with a freeform drawing, which is why I haven't done something about this yet.

Mike
Reply
#4
(06-03-2018, 04:36 AM)Zuberman Wrote: It's definitely something I want to do, and I've tried to explore how to do it, but I haven't found anything that has worked so far. I've tried changing the way the painting of the highlighter works on Android by utilizing different PorderDuff Xfermode values, but no matter what I try, the drawing either goes on top of the image or behind it. So that approach doesn't seem to be sufficient unless I'm doing something wrong. That leads me to believe I have to modify the pixels behind on the content on the page myself instead of relying on a blending/multiplying technique. Having to modify the pixel values of the bitmap representing the page is not the simplest thing when dealing with a freeform drawing, which is why I haven't done something about this yet.

Mike

Hi Mike,

my idea could be making some kind of "mathematical operations" between graphic layers. In this way it could be possible to add or multiply, or even subtract, two or more layers so that their values combine themselves.

I've found this page: https://developer.android.com/reference/...rDuff.Mode, maybe you've already seen it, anyway it seems to have some interesting infos on blending layers. Hope it helps...


Attached Files Thumbnail(s)
   
Marco

Samsung Galaxy Note Pro 12,2" - Nord Stage 2 HA88
Reply
#5
That's exactly what I tried to use. Here's something interesting I just found though - it works perfectly when using the rectangle draw mode for the highlighter. The highlight correctly goes behind the text (as the pixels are multipled and merged). The bug appears to be with using a Path to draw the highlight in combination with the porterduff xfermode. What I'm seeing is a black box around the highlight with the hightlight behind the black text. I'm trying to look for information, but I'm really hoping this isn't a limitation in Google's code. If I can figure out how to get past the issue with the black box, then I'll have a working solution (for Android at least, I don't think Windows 10 has an equivalent).

Mike
Reply
#6
Well I found a solution. It's not the most performant, but I think in this case, having the highlighter function like people would expect is more important.

Thanks,
Mike
Reply
#7
I've found these two articles about drawing layers in Android:

https://stackoverflow.com/questions/2739...-imageview

https://developer.android.com/reference/...erDrawable

Did you already seen them?
Marco

Samsung Galaxy Note Pro 12,2" - Nord Stage 2 HA88
Reply
#8
Those aren't really applicable for this. I'm using a Canvas to draw a Path object on top of an existing ImageView. So in order to blend the pixels, I have to use a PorterDuffXferMode with the Paint object used to draw the Path. There is an issue when doing that directly on top of the ImageView though, so instead, I have to render the freeform annotation to a background bitmap, then blend the two bitmaps.

Mike
Reply
#9
Seems a good trick! ;-)
Marco

Samsung Galaxy Note Pro 12,2" - Nord Stage 2 HA88
Reply
#10
Stupid suggestion maybe, but isn't it possible to draw a Path object below an existing ImageView?
Johan
www.johanvromans.nlwww.howsagoin.nlwww.hetgeluidvanseptember.nl
Samsung Galaxy Note 2 (N8010) 10.1", Android 7.1.2 (LineageOS), AirTurn Duo & Digit.
Asus Zenpad (Z300M) 10.1", Android 7.0 (backup).
Samsung A3 (A320FL), Android 8.0 (emergency).
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.