Highlighter Pen in C #

I want to make my pen a marker, so basically changing its opacity, but I don’t know how to do it. I am currently using colordialog to let me use the right color to select, but this allows me to have colors that are not transparent enough to be visible through it, as a PowerPoint highlighting tool as an example of the opacity of the tool. Thus, any code that allows me to integrate the use of my colordialog with opacity in order to be able to see through it.

thank

+3
source share
3 answers

Something like that:

Color baseColor = Color.Red;  // Or whatever, from the color picker
Color highlighter = Color.FromArgb(128, baseColor);

FromArgb - "" 0 ( ) 255 ( ), 128 50%.

+6

Is this a WinForms app? Could you use a tablet pc and ink ? (This MSDN page is for Windows XP Tablet Edition, but I think ink components are included in Vista and Windows 7)

+1
source

Source: https://habr.com/ru/post/1773666/


All Articles