• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ LiceColor函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LiceColor函数的典型用法代码示例。如果您正苦于以下问题:C++ LiceColor函数的具体用法?C++ LiceColor怎么用?C++ LiceColor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LiceColor函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: LiceColor

bool IGraphics::DrawArc(const IColor* pColor, float cx, float cy, float r, float minAngle, float maxAngle,
                        const IChannelBlend* pBlend, bool antiAlias)
{
  _LICE::LICE_Arc(mDrawBitmap, cx, cy, r, minAngle, maxAngle, LiceColor(pColor),
                  LiceWeight(pBlend), LiceBlendMode(pBlend), antiAlias);
  return true;
}
开发者ID:AdrianGin,项目名称:Pathogen,代码行数:7,代码来源:IGraphics.cpp


示例2: CacheFont

bool IGraphics::DrawIText(IText* pTxt, char* str, IRECT* pR)
{
  if (!str || str[0] == '\0') {
    return true;
  }
  
  LICE_IFont* font = pTxt->mCached;
  if (!font)
  {
    font = CacheFont(pTxt);
    if (!font) return false;
  }
  
  LICE_pixel color = LiceColor(&pTxt->mColor);
  font->SetTextColor(color);
  
  UINT fmt = DT_NOCLIP;
  if (LICE_GETA(color) < 255) fmt |= LICE_DT_USEFGALPHA;
  if (pTxt->mAlign == IText::kAlignNear)
    fmt |= DT_LEFT;
  else if (pTxt->mAlign == IText::kAlignCenter)
    fmt |= DT_CENTER;
  else // if (pTxt->mAlign == IText::kAlignFar)
    fmt |= DT_RIGHT;
  
  RECT R = { pR->L, pR->T, pR->R, pR->B };
  font->DrawText(mDrawBitmap, str, -1, &R, fmt);
  return true;
}
开发者ID:b-vesco,项目名称:wdl-ol,代码行数:29,代码来源:IGraphics.cpp


示例3: ForcePixel

bool IGraphics::ForcePixel(const IColor* pColor, int x, int y)
{
  LICE_pixel* px = mDrawBitmap->getBits();
  px += x + y * mDrawBitmap->getRowSpan();
  *px = LiceColor(pColor);
  return true;
}
开发者ID:AdrianGin,项目名称:Pathogen,代码行数:7,代码来源:IGraphics.cpp


示例4: int

bool IGraphics::DrawPoint(const IColor* pColor, float x, float y,
                          const IChannelBlend* pBlend, bool antiAlias)
{
  float weight = (pBlend ? pBlend->mWeight : 1.0f);
  _LICE::LICE_PutPixel(mDrawBitmap, int(x + 0.5f), int(y + 0.5f), LiceColor(pColor), weight, LiceBlendMode(pBlend));
  return true;
}
开发者ID:AdrianGin,项目名称:Pathogen,代码行数:7,代码来源:IGraphics.cpp


示例5: CacheFont

bool IGraphics::DrawIText(IText* pTxt, char* str, IRECT* pR, bool measure)
{
  if (!str || str[0] == '\0')
  {
    return true;
  }

  LICE_IFont* font = pTxt->mCached;
  
  if (!font)
  {
    font = CacheFont(pTxt);
    if (!font) return false;
  }

  LICE_pixel color = LiceColor(&pTxt->mColor);
  font->SetTextColor(color);

  UINT fmt = DT_NOCLIP;
  if (LICE_GETA(color) < 255) fmt |= LICE_DT_USEFGALPHA;
  if (pTxt->mAlign == IText::kAlignNear)
    fmt |= DT_LEFT;
  else if (pTxt->mAlign == IText::kAlignCenter)
    fmt |= DT_CENTER;
  else // if (pTxt->mAlign == IText::kAlignFar)
    fmt |= DT_RIGHT;

  if (measure) 
  {
    fmt |= DT_CALCRECT;
    RECT R = {0,0,0,0};
    font->DrawText(mDrawBitmap, str, -1, &R, fmt);
    
    if( pTxt->mAlign == IText::kAlignNear)
    {
      pR->R = R.right;
    }
    else if (pTxt->mAlign == IText::kAlignCenter)
    {
      pR->L = (int) pR->MW() - (R.right/2);
      pR->R = pR->L + R.right;
    }
    else // (pTxt->mAlign == IText::kAlignFar)
    {
      pR->L = pR->R - R.right;
      pR->R = pR->L + R.right;
    }
    
    pR->B = pR->T + R.bottom;
  }
  else 
  {
    RECT R = { pR->L, pR->T, pR->R, pR->B };
    font->DrawText(mDrawBitmap, str, -1, &R, fmt);
  }

  return true;
}
开发者ID:AdrianGin,项目名称:Pathogen,代码行数:58,代码来源:IGraphics.cpp


示例6: Width

bool IGraphicsLice::DrawHorizontalLine(const IColor* pColor, int yi, int xLo, int xHi)
{
  int W = Width(), H = Height();
  yi = BOUNDED(yi, 0, H - 1);
  xLo = BOUNDED(xLo, 0, W - 1);
  xHi = BOUNDED(xHi, 0, W - 1);
    
  LICE_pixel px = LiceColor(pColor);
  LICE_pixel* pPx = mDrawBitmap->getBits() + yi * W + xLo;
  for (int i = xLo; i <= xHi; ++i, ++pPx) {
    *pPx = px;
  }
  return true;
}
开发者ID:b-vesco,项目名称:vfx-wdl,代码行数:14,代码来源:IGraphicsLice.cpp


示例7: LiceBlendMode

bool IGraphics::FillRoundRect(const IColor* pColor, IRECT* pR, const IChannelBlend* pBlend, int cornerradius, bool aa)
{
  int x1 = pR->L;
  int y1 = pR->T;
  int h = pR->H();
  int w = pR->W();
  
  int mode = LiceBlendMode(pBlend);
  float weight = LiceWeight(pBlend);
  LICE_pixel color = LiceColor(pColor);
  
  _LICE::LICE_FillRect(mDrawBitmap, x1+cornerradius, y1, w-2*cornerradius, h, color, weight, mode);
  _LICE::LICE_FillRect(mDrawBitmap, x1, y1+cornerradius, cornerradius, h-2*cornerradius,color, weight, mode);
  _LICE::LICE_FillRect(mDrawBitmap, x1+w-cornerradius, y1+cornerradius, cornerradius, h-2*cornerradius, color, weight, mode);

  //void LICE_FillCircle(LICE_IBitmap* dest, float cx, float cy, float r, LICE_pixel color, float alpha, int mode, bool aa)
  _LICE::LICE_FillCircle(mDrawBitmap, (float) x1+cornerradius, (float) y1+cornerradius, (float) cornerradius, color, weight, mode, aa);
  _LICE::LICE_FillCircle(mDrawBitmap, (float) x1+w-cornerradius-1, (float) y1+h-cornerradius-1, (float) cornerradius, color, weight, mode, aa);
  _LICE::LICE_FillCircle(mDrawBitmap, (float) x1+w-cornerradius-1, (float) y1+cornerradius, (float) cornerradius, color, weight, mode, aa);
  _LICE::LICE_FillCircle(mDrawBitmap, (float) x1+cornerradius, (float) y1+h-cornerradius-1, (float) cornerradius, color, weight, mode, aa);
  
  return true;
}
开发者ID:AdrianGin,项目名称:Pathogen,代码行数:23,代码来源:IGraphics.cpp


示例8: LiceColor

bool IGraphicsLice::DrawCircle(const IColor* pColor, float cx, float cy, float r,
	const IChannelBlend* pBlend, bool antiAlias)
{
  _LICE::LICE_Circle(mDrawBitmap, cx, cy, r, LiceColor(pColor), LiceWeight(pBlend), LiceBlendMode(pBlend), antiAlias);
	return true;
}
开发者ID:b-vesco,项目名称:vfx-wdl,代码行数:6,代码来源:IGraphicsLice.cpp


示例9: CacheFont

bool IGraphics::DrawIText(IText* pTxt, char* str, IRECT* pR, bool measure)
{
  if (!str || str[0] == '\0')
  {
    return true;
  }

  LICE_IFont* font = pTxt->mCached;
  
  if (!font)
  {
    font = CacheFont(pTxt);
    if (!font) return false;
  }

  LICE_pixel color = LiceColor(&pTxt->mColor);
  font->SetTextColor(color);

#ifdef OS_WIN
  UINT fmt = DT_NOCLIP;
#else
  // OS X doesn't have an ellipsis option. So we need another way to prevent
  // the text from leaving the rectangle.
  UINT fmt = 0;
#endif
  if (LICE_GETA(color) < 255) fmt |= LICE_DT_USEFGALPHA;
  if (pTxt->mAlign == IText::kAlignNear)
    fmt |= DT_LEFT;
  else if (pTxt->mAlign == IText::kAlignCenter)
    fmt |= DT_CENTER;
  else // if (pTxt->mAlign == IText::kAlignFar)
    fmt |= DT_RIGHT;

  // Crop text on Windows if too long
  if (!measure) {
	  fmt |= DT_END_ELLIPSIS;
  }

  if (measure) 
  {
    fmt |= DT_CALCRECT;
    RECT R = {0,0,0,0};
    font->DrawText(mDrawBitmap, str, -1, &R, fmt);
    
    if( pTxt->mAlign == IText::kAlignNear)
    {
      pR->R = R.right;
    }
    else if (pTxt->mAlign == IText::kAlignCenter)
    {
      pR->L = (int) pR->MW() - (R.right/2);
      pR->R = pR->L + R.right;
    }
    else // (pTxt->mAlign == IText::kAlignFar)
    {
      pR->L = pR->R - R.right;
      pR->R = pR->L + R.right;
    }
    
    pR->B = pR->T + R.bottom;
  }
  else 
  {
    RECT R = { pR->L, pR->T, pR->R, pR->B };
    font->DrawText(mDrawBitmap, str, -1, &R, fmt);
  }

  return true;
}
开发者ID:jlertle,项目名称:wdl-ol,代码行数:69,代码来源:IGraphics.cpp



注:本文中的LiceColor函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Light函数代码示例发布时间:2022-05-30
下一篇:
C++ LibVarGetValue函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap