Lines Matching refs:style
21 #include "gfx_utils/style.h"
25 const Style& style, OpacityType opaScale)
55 if (style.borderWidth_ == 0) {
56 if (style.borderRadius_ == 0) {
58 OpacityType opa = DrawUtils::GetMixOpacity(opaScale, style.bgOpa_);
59 DrawUtils::GetInstance()->DrawColorArea(gfxDstBuffer, rect, dirtyRect, style.bgColor_, opa);
63 DrawRectRadiusWithoutBorder(gfxDstBuffer, rect, dirtyRect, style, opaScale);
66 if (style.borderRadius_ == 0) {
68 DrawRectBorderWithoutRadius(gfxDstBuffer, rect, dirtyRect, style, opaScale);
69 } else if (style.borderRadius_ < style.borderWidth_) {
71 DrawRectRadiusSmallThanBorder(gfxDstBuffer, rect, dirtyRect, style, opaScale);
72 } else if (style.borderRadius_ == style.borderWidth_) {
74 DrawRectRadiusEqualBorder(gfxDstBuffer, rect, dirtyRect, style, opaScale);
77 DrawRectRadiusBiggerThanBorder(gfxDstBuffer, rect, dirtyRect, style, opaScale);
83 const Style& style, OpacityType opaScale)
86 if ((rect.GetWidth() > rect.GetHeight()) && (style.borderRadius_ >= rect.GetHeight() / 2)) {
87 DrawRectRadiusWithoutBorderCon1(gfxDstBuffer, rect, dirtyRect, style, opaScale);
88 } else if ((rect.GetWidth() < rect.GetHeight()) && (style.borderRadius_ >= rect.GetWidth() / 2)) {
89 DrawRectRadiusWithoutBorderCon2(gfxDstBuffer, rect, dirtyRect, style, opaScale);
90 } else if ((rect.GetWidth() == rect.GetHeight()) && (style.borderRadius_ >= rect.GetWidth() / 2)) {
91 DrawRectRadiusWithoutBorderCon3(gfxDstBuffer, rect, dirtyRect, style, opaScale);
93 DrawRectRadiusWithoutBorderCon4(gfxDstBuffer, rect, dirtyRect, style, opaScale);
98 const Style& style, OpacityType opaScale)
108 Style arcStyle = style;
110 arcStyle.lineColor_ = style.bgColor_;
111 arcStyle.lineOpa_ = style.bgOpa_;
132 OpacityType opa = DrawUtils::GetMixOpacity(opaScale, style.bgOpa_);
133 drawUtils->DrawColorArea(gfxDstBuffer, topRect, dirtyRect, style.bgColor_, opa);
137 drawUtils->DrawColorArea(gfxDstBuffer, bottomRect, dirtyRect, style.bgColor_, opa);
141 const Style& style, OpacityType opaScale)
151 Style arcStyle = style;
153 arcStyle.lineColor_ = style.bgColor_;
154 arcStyle.lineOpa_ = style.bgOpa_;
174 OpacityType opa = DrawUtils::GetMixOpacity(opaScale, style.bgOpa_);
175 DrawUtils::GetInstance()->DrawColorArea(gfxDstBuffer, middleRect, dirtyRect, style.bgColor_, opa);
179 const Style& style, OpacityType opaScale)
185 Style arcStyle = style;
187 arcStyle.lineColor_ = style.bgColor_;
188 arcStyle.lineOpa_ = style.bgOpa_;
201 const Style& style, OpacityType opaScale)
203 int16_t radius = style.borderRadius_;
214 OpacityType opa = DrawUtils::GetMixOpacity(opaScale, style.bgOpa_);
218 drawUtils->DrawColorArea(gfxDstBuffer, topRect, dirtyRect, style.bgColor_, opa);
222 drawUtils->DrawColorArea(gfxDstBuffer, middleRect, dirtyRect, style.bgColor_, opa);
226 drawUtils->DrawColorArea(gfxDstBuffer, bottomRect, dirtyRect, style.bgColor_, opa);
228 Style arcStyle = style;
230 arcStyle.lineColor_ = style.bgColor_;
231 arcStyle.lineOpa_ = style.bgOpa_;
263 const Style& style, OpacityType opaScale)
266 int16_t col2X = rect.GetLeft() + style.borderWidth_ - 1;
267 int16_t col3X = rect.GetRight() - style.borderWidth_ + 1;
271 int16_t row2Y = rect.GetTop() + style.borderWidth_ - 1;
272 int16_t row3Y = rect.GetBottom() - style.borderWidth_ + 1;
275 OpacityType opa = DrawUtils::GetMixOpacity(opaScale, style.borderOpa_);
279 drawUtils->DrawColorArea(gfxDstBuffer, topRect, dirtyRect, style.borderColor_, opa);
283 drawUtils->DrawColorArea(gfxDstBuffer, leftRect, dirtyRect, style.borderColor_, opa);
285 OpacityType opaBg = DrawUtils::GetMixOpacity(opaScale, style.bgOpa_);
288 drawUtils->DrawColorArea(gfxDstBuffer, middleRect, dirtyRect, style.bgColor_, opaBg);
292 drawUtils->DrawColorArea(gfxDstBuffer, rightRect, dirtyRect, style.borderColor_, opa);
296 drawUtils->DrawColorArea(gfxDstBuffer, bottomRect, dirtyRect, style.borderColor_, opa);
300 const Style& style, OpacityType opaScale)
303 int16_t col2X = rect.GetLeft() + style.borderRadius_ - 1;
304 int16_t col3X = rect.GetRight() - style.borderRadius_ + 1;
308 int16_t row2Y = rect.GetTop() + style.borderRadius_ - 1;
309 int16_t row3Y = rect.GetBottom() - style.borderRadius_ + 1;
312 Style arcStyle = style;
313 arcStyle.lineWidth_ = style.borderWidth_;
314 arcStyle.lineColor_ = style.borderColor_;
315 arcStyle.lineOpa_ = style.borderOpa_;
321 arcInfo.radius = style.borderRadius_;
345 OpacityType opa = DrawUtils::GetMixOpacity(opaScale, style.borderOpa_);
348 DrawUtils::GetInstance()->DrawColorArea(gfxDstBuffer, topRect, dirtyRect, style.borderColor_, opa);
353 drawUtils->DrawColorArea(gfxDstBuffer, leftRect, dirtyRect, style.borderColor_, opa);
355 OpacityType opaBg = DrawUtils::GetMixOpacity(opaScale, style.bgOpa_);
358 drawUtils->DrawColorArea(gfxDstBuffer, middleRect, dirtyRect, style.bgColor_, opaBg);
362 drawUtils->DrawColorArea(gfxDstBuffer, rightRect, dirtyRect, style.borderColor_, opa);
366 drawUtils->DrawColorArea(gfxDstBuffer, bottomRect, dirtyRect, style.borderColor_, opa);
370 const Style& style, OpacityType opaScale)
373 int16_t radiusCol2X = rect.GetLeft() + style.borderRadius_ - 1;
374 int16_t radiusCol3X = rect.GetRight() - style.borderRadius_ + 1;
378 int16_t radiusRow2Y = rect.GetTop() + style.borderRadius_ - 1;
379 int16_t radiusRow3Y = rect.GetBottom() - style.borderRadius_ + 1;
383 int16_t rectCol2X = rect.GetLeft() + style.borderWidth_ - 1;
384 int16_t rectCol3X = rect.GetRight() - style.borderWidth_ + 1;
388 int16_t rectRow2Y = rect.GetTop() + style.borderWidth_ - 1;
389 int16_t rectRow3Y = rect.GetBottom() - style.borderWidth_ + 1;
391 Style arcStyle = style;
392 arcStyle.lineWidth_ = style.borderWidth_;
393 arcStyle.lineColor_ = style.borderColor_;
394 arcStyle.lineOpa_ = style.borderOpa_;
400 arcInfo.radius = style.borderRadius_;
424 OpacityType opa = DrawUtils::GetMixOpacity(opaScale, style.borderOpa_);
428 drawUtils->DrawColorArea(gfxDstBuffer, topRect, dirtyRect, style.borderColor_, opa);
430 drawUtils->DrawColorArea(gfxDstBuffer, topRect2, dirtyRect, style.borderColor_, opa);
434 drawUtils->DrawColorArea(gfxDstBuffer, leftRect, dirtyRect, style.borderColor_, opa);
436 OpacityType opaBg = DrawUtils::GetMixOpacity(opaScale, style.bgOpa_);
439 drawUtils->DrawColorArea(gfxDstBuffer, middleRect, dirtyRect, style.bgColor_, opaBg);
443 drawUtils->DrawColorArea(gfxDstBuffer, rightRect, dirtyRect, style.borderColor_, opa);
447 drawUtils->DrawColorArea(gfxDstBuffer, bottomRect, dirtyRect, style.borderColor_, opa);
449 drawUtils->DrawColorArea(gfxDstBuffer, bottomRect2, dirtyRect, style.borderColor_, opa);
453 const Style& style, OpacityType opaScale)
456 if ((rect.GetWidth() > rect.GetHeight()) && (style.borderRadius_ >= rect.GetHeight() / 2)) {
457 DrawRectRadiusBiggerThanBorderCon1(gfxDstBuffer, rect, dirtyRect, style, opaScale);
458 } else if ((rect.GetWidth() < rect.GetHeight()) && (style.borderRadius_ >= rect.GetWidth() / 2)) {
459 DrawRectRadiusBiggerThanBorderCon2(gfxDstBuffer, rect, dirtyRect, style, opaScale);
460 } else if ((rect.GetWidth() == rect.GetHeight()) && (style.borderRadius_ >= rect.GetWidth() / 2)) {
461 DrawRectRadiusBiggerThanBorderCon3(gfxDstBuffer, rect, dirtyRect, style, opaScale);
463 DrawRectRadiusBiggerThanBorderCon4(gfxDstBuffer, rect, dirtyRect, style, opaScale);
468 const Style& style, OpacityType opaScale)
471 int16_t borderWidth = style.borderWidth_;
481 Style arcStyle = style;
483 arcStyle.lineColor_ = style.borderColor_;
484 arcStyle.lineOpa_ = style.borderOpa_;
504 arcStyle.lineColor_ = style.bgColor_;
505 arcStyle.lineOpa_ = style.bgOpa_;
519 OpacityType opa = DrawUtils::GetMixOpacity(opaScale, style.borderOpa_);
523 drawUtils->DrawColorArea(gfxDstBuffer, topBorderRect, dirtyRect, style.borderColor_, opa);
524 OpacityType opaBg = DrawUtils::GetMixOpacity(opaScale, style.bgOpa_);
527 drawUtils->DrawColorArea(gfxDstBuffer, middleInnerRect, dirtyRect, style.bgColor_, opaBg);
529 drawUtils->DrawColorArea(gfxDstBuffer, middleInnerRect2, dirtyRect, style.bgColor_, opaBg);
533 drawUtils->DrawColorArea(gfxDstBuffer, bottomBorderRect, dirtyRect, style.borderColor_, opa);
537 const Style& style, OpacityType opaScale)
540 int16_t borderWidth = style.borderWidth_;
550 Style arcStyle = style;
552 arcStyle.lineColor_ = style.borderColor_;
553 arcStyle.lineOpa_ = style.borderOpa_;
572 arcStyle.lineColor_ = style.bgColor_;
573 arcStyle.lineOpa_ = style.bgOpa_;
587 OpacityType opa = DrawUtils::GetMixOpacity(opaScale, style.borderOpa_);
591 drawUtils->DrawColorArea(gfxDstBuffer, topBorderRect, dirtyRect, style.borderColor_, opa);
593 OpacityType opaBg = DrawUtils::GetMixOpacity(opaScale, style.bgOpa_);
596 drawUtils->DrawColorArea(gfxDstBuffer, middleInnerRect, dirtyRect, style.bgColor_, opaBg);
600 drawUtils->DrawColorArea(gfxDstBuffer, bottomBorderRect, dirtyRect, style.borderColor_, opa);
604 const Style& style, OpacityType opaScale)
607 int16_t borderWidth = style.borderWidth_;
611 Style arcStyle = style;
613 arcStyle.lineColor_ = style.borderColor_;
614 arcStyle.lineOpa_ = style.borderOpa_;
628 arcStyle.lineColor_ = style.bgColor_;
629 arcStyle.lineOpa_ = style.bgOpa_;
640 const Style& style, OpacityType opaScale)
642 int16_t radius = style.borderRadius_;
643 int16_t borderWidth = style.borderWidth_;
658 Style arcStyle = style;
660 arcStyle.lineColor_ = style.borderColor_;
661 arcStyle.lineOpa_ = style.borderOpa_;
691 arcStyle.lineColor_ = style.bgColor_;
692 arcStyle.lineOpa_ = style.bgOpa_;
716 OpacityType opa = DrawUtils::GetMixOpacity(opaScale, style.borderOpa_);
719 DrawUtils::GetInstance()->DrawColorArea(gfxDstBuffer, topBorderRect, dirtyRect, style.borderColor_, opa);
721 OpacityType opaBg = DrawUtils::GetMixOpacity(opaScale, style.bgOpa_);
725 drawUtils->DrawColorArea(gfxDstBuffer, topInnerRect, dirtyRect, style.bgColor_, opaBg);
729 drawUtils->DrawColorArea(gfxDstBuffer, leftBorderRect, dirtyRect, style.borderColor_, opa);
733 drawUtils->DrawColorArea(gfxDstBuffer, middleInnerRect, dirtyRect, style.bgColor_, opaBg);
737 drawUtils->DrawColorArea(gfxDstBuffer, rightBorderRect, dirtyRect, style.borderColor_, opa);
741 drawUtils->DrawColorArea(gfxDstBuffer, bottomInnerRect, dirtyRect, style.bgColor_, opaBg);
745 drawUtils->DrawColorArea(gfxDstBuffer, bottomBorderRect, dirtyRect, style.borderColor_, opa);