zoukankan      html  css  js  c++  java
  • 颜色取反

    COLORREF   crSrc   =   ....;  
      COLORREF   crDst   =   0x00ffffff-crSrc;  
      Top

    2 楼xxhfortrue(红叶)回复于 2004-07-28 11:25:21 得分 5

    同意楼上Top

    3 楼ShaftWhy(归去来兮)回复于 2004-07-28 11:29:00 得分 5

    AgreeAgreeTop

    4 楼holyeagle(一杯清茶)回复于 2004-07-28 11:30:51 得分 10

    自己转  
      COLORREF   RGB   =   dc.GetPexel()   |   0x00FFFFFF;   //避免高位出错。  
      COLORREF   RGBRev   =   0x00ffffff   -   RGB;Top

    5 楼jennifergiant(希罗·尤尔)回复于 2004-07-28 11:36:40 得分 5

    同上 精辟Top

    6 楼happyparrot(快乐鹦鹉)回复于 2004-07-28 11:38:34 得分 20

    补充一下,如果你只有各个分色的值,比如R,G,B,那么反色等于:  
      COLORREF   ref   =   RGB(255-R,255-G,255-B);  
      或者ref   =   0x00ffffff   -   RGB(R,G,B);Top

    7 楼FengYuanMSFT((6.4 被封杀)袁峰 http://fengyuancom.spaces.live.com)回复于 2004-07-28 11:48:11 得分 5

    First   you   have   to   define   what   is   a   reverse   color.   Reverse   is   always   relative   to   an   operation   and   a   constant.  
       
      What   you   guys   are   using   is   finding   c'   for   c   such   that   c   +   c'   =   white,   so   '+'   is   the   operation.  
       
      But   reverse   could   also   be   defined   by   finding   c'   for   c   such   that   c   XOR   c'   =   white,   so   'XOR'   is   the   operation   here.

  • 相关阅读:
    C#心得与经验(二)
    C#心得与经验(一)
    与C#的第一次~
    2014应届生面试经验详谈。
    Block基本用法
    OC中得那些“点”
    PCH文件的使用
    UIScrollView的subViews使用小注意
    分享一下本人录制图像处理与OpenCV学习视频
    OpenCV 3.2正式发布啦
  • 原文地址:https://www.cnblogs.com/kevinzhwl/p/3878983.html
Copyright © 2011-2022 走看看