422{
423
425 {
427 {
428 if (bevelPosition ==
BEVEL1)
429 {
430 int offsetX, offsetY;
431
433 {
434
435 offsetX = rect.left + borderWidth;
436 offsetY = rect.top + borderWidth;
437 SetPixel(hdc, offsetX+3, offsetY+1, GetPixel(hdc, offsetX+3, offsetY));
438 SetPixel(hdc, offsetX+2, offsetY+1, GetPixel(hdc, offsetX+2, offsetY));
439 SetPixel(hdc, offsetX+1, offsetY+2, GetPixel(hdc, offsetX, offsetY+2));
440 SetPixel(hdc, offsetX+1, offsetY+3, GetPixel(hdc, offsetX, offsetY+3));
441 }
442
444 {
445
446 offsetX = rect.left + borderWidth;
447 offsetY = rect.bottom - borderWidth - 1;
448 SetPixel(hdc, offsetX+1, offsetY-3, GetPixel(hdc, offsetX, offsetY-3));
449 SetPixel(hdc, offsetX+1, offsetY-2, GetPixel(hdc, offsetX, offsetY-2));
450 SetPixel(hdc, offsetX+2, offsetY-1, GetPixel(hdc, offsetX+2, offsetY));
451 SetPixel(hdc, offsetX+3, offsetY-1, GetPixel(hdc, offsetX+3, offsetY));
452 }
453
455 {
456
457 offsetX = rect.right - borderWidth - 1;
458 offsetY = rect.top + borderWidth;
459 SetPixel(hdc, offsetX-3, offsetY+1, GetPixel(hdc, offsetX-3, offsetY));
460 SetPixel(hdc, offsetX-2, offsetY+1, GetPixel(hdc, offsetX-2, offsetY));
461 SetPixel(hdc, offsetX-1, offsetY+2, GetPixel(hdc, offsetX, offsetY+2));
462 SetPixel(hdc, offsetX-1, offsetY+3, GetPixel(hdc, offsetX, offsetY+3));
463 }
464
466 {
467
468 offsetX = rect.right - borderWidth - 1;
469 offsetY = rect.bottom - borderWidth - 1;
470 SetPixel(hdc, offsetX-1, offsetY-3, GetPixel(hdc, offsetX, offsetY-3));
471 SetPixel(hdc, offsetX-1, offsetY-2, GetPixel(hdc, offsetX, offsetY-2));
472 SetPixel(hdc, offsetX-2, offsetY-1, GetPixel(hdc, offsetX-2, offsetY));
473 SetPixel(hdc, offsetX-3, offsetY-1, GetPixel(hdc, offsetX-3, offsetY));
474 }
475 }
476 else if (bevelPosition ==
BEVEL2)
477 {
478
479 }
480 }
481
482 if (borderWidth > 0)
483 {
484 int offsetX, offsetY;
485
487 {
488
489 offsetX = rect.left + borderWidth;
490 offsetY = rect.top + borderWidth;
491 SetPixel(hdc, offsetX, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY-1), GetPixel(hdc, offsetX-1, offsetY)));
492 SetPixel(hdc, offsetX+1, offsetY, GetPixel(hdc, offsetX+1, offsetY-1));
493 SetPixel(hdc, offsetX+2, offsetY, GetPixel(hdc, offsetX+2, offsetY-1));
494 SetPixel(hdc, offsetX, offsetY+1, GetPixel(hdc, offsetX-1, offsetY+1));
495 SetPixel(hdc, offsetX, offsetY+2, GetPixel(hdc, offsetX-1, offsetY+2));
496 SetPixel(hdc, offsetX+1, offsetY+1,
pSettings->
MixColors(GetPixel(hdc, offsetX+1, offsetY+1), GetPixel(hdc, offsetX, offsetY)));
497 SetPixel(hdc, offsetX+3, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX+3, offsetY), GetPixel(hdc, offsetX+2, offsetY)));
498 SetPixel(hdc, offsetX, offsetY+3,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY+3), GetPixel(hdc, offsetX, offsetY+2)));
499 }
500
502 {
503
504 offsetX = rect.left + borderWidth;
505 offsetY = rect.bottom - borderWidth - 1;
506 SetPixel(hdc, offsetX, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY+1), GetPixel(hdc, offsetX-1, offsetY)));
507 SetPixel(hdc, offsetX+1, offsetY, GetPixel(hdc, offsetX+1, offsetY+1));
508 SetPixel(hdc, offsetX+2, offsetY, GetPixel(hdc, offsetX+2, offsetY+1));
509 SetPixel(hdc, offsetX, offsetY-1, GetPixel(hdc, offsetX-1, offsetY-1));
510 SetPixel(hdc, offsetX, offsetY-2, GetPixel(hdc, offsetX-1, offsetY-2));
511 SetPixel(hdc, offsetX+1, offsetY-1,
pSettings->
MixColors(GetPixel(hdc, offsetX+1, offsetY-1), GetPixel(hdc, offsetX, offsetY)));
512 SetPixel(hdc, offsetX+3, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX+3, offsetY), GetPixel(hdc, offsetX+2, offsetY)));
513 SetPixel(hdc, offsetX, offsetY-3,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY-3), GetPixel(hdc, offsetX, offsetY-2)));
514 }
515
517 {
518
519 offsetX = rect.right - borderWidth - 1;
520 offsetY = rect.top + borderWidth;
521 SetPixel(hdc, offsetX, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY-1), GetPixel(hdc, offsetX+1, offsetY)));
522 SetPixel(hdc, offsetX-1, offsetY, GetPixel(hdc, offsetX-1, offsetY-1));
523 SetPixel(hdc, offsetX-2, offsetY, GetPixel(hdc, offsetX-2, offsetY-1));
524 SetPixel(hdc, offsetX, offsetY+1, GetPixel(hdc, offsetX+1, offsetY+1));
525 SetPixel(hdc, offsetX, offsetY+2, GetPixel(hdc, offsetX+1, offsetY+2));
526 SetPixel(hdc, offsetX-1, offsetY+1,
pSettings->
MixColors(GetPixel(hdc, offsetX-1, offsetY+1), GetPixel(hdc, offsetX, offsetY)));
527 SetPixel(hdc, offsetX-3, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX-3, offsetY), GetPixel(hdc, offsetX-2, offsetY)));
528 SetPixel(hdc, offsetX, offsetY+3,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY+3), GetPixel(hdc, offsetX, offsetY+2)));
529 }
530
532 {
533
534 offsetX = rect.right - borderWidth - 1;
535 offsetY = rect.bottom - borderWidth - 1;
536 SetPixel(hdc, offsetX, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY+1), GetPixel(hdc, offsetX+1, offsetY)));
537 SetPixel(hdc, offsetX-1, offsetY, GetPixel(hdc, offsetX-1, offsetY+1));
538 SetPixel(hdc, offsetX-2, offsetY, GetPixel(hdc, offsetX-2, offsetY+1));
539 SetPixel(hdc, offsetX, offsetY-1, GetPixel(hdc, offsetX+1, offsetY-1));
540 SetPixel(hdc, offsetX, offsetY-2, GetPixel(hdc, offsetX+1, offsetY-2));
541 SetPixel(hdc, offsetX-1, offsetY-1,
pSettings->
MixColors(GetPixel(hdc, offsetX-1, offsetY-1), GetPixel(hdc, offsetX, offsetY)));
542 SetPixel(hdc, offsetX-3, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX-3, offsetY), GetPixel(hdc, offsetX-2, offsetY)));
543 SetPixel(hdc, offsetX, offsetY-3,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY-3), GetPixel(hdc, offsetX, offsetY-2)));
544 }
545 }
546 }
547
548
549
550 else
551 {
553 {
554 if (bevelPosition ==
BEVEL1)
555 {
556 int offsetX, offsetY;
557
559 {
560
561 offsetX = rect.left + borderWidth;
562 offsetY = rect.top + borderWidth;
563 SetPixel(hdc, offsetX+1, offsetY+1, GetPixel(hdc, offsetX, offsetY));
564 }
565
567 {
568
569 offsetX = rect.left + borderWidth;
570 offsetY = rect.bottom - borderWidth - 1;
571 SetPixel(hdc, offsetX+1, offsetY-1, GetPixel(hdc, offsetX, offsetY));
572 }
573
575 {
576
577 offsetX = rect.right - borderWidth - 1;
578 offsetY = rect.top + borderWidth;
579 SetPixel(hdc, offsetX-1, offsetY+1, GetPixel(hdc, offsetX, offsetY));
580 }
581
583 {
584
585 offsetX = rect.right - borderWidth - 1;
586 offsetY = rect.bottom - borderWidth - 1;
587 SetPixel(hdc, offsetX-1, offsetY-1, GetPixel(hdc, offsetX, offsetY));
588 }
589 }
590 else if (bevelPosition ==
BEVEL2)
591 {
592
593 }
594 }
595
596 if (borderWidth > 0)
597 {
598 int offsetX, offsetY;
599
601 {
602
603 offsetX = rect.left;
604 offsetY = rect.top;
605 SetPixel(hdc, offsetX+1, offsetY+1, GetPixel(hdc, offsetX, offsetY));
606 SetPixel(hdc, offsetX+2, offsetY+1, GetPixel(hdc, offsetX+2, offsetY));
607 SetPixel(hdc, offsetX+1, offsetY+2, GetPixel(hdc, offsetX, offsetY+2));
608 offsetX += borderWidth;
609 offsetY += borderWidth;
610 SetPixel(hdc, offsetX, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY-1), GetPixel(hdc, offsetX-1, offsetY)));
611 SetPixel(hdc, offsetX+1, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX+1, offsetY), GetPixel(hdc, offsetX+1, offsetY-1)));
612 SetPixel(hdc, offsetX, offsetY+1,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY+1), GetPixel(hdc, offsetX-1, offsetY+1)));
613
614
615
616
617
618 }
619
621 {
622
623 offsetX = rect.left;
624 offsetY = rect.bottom - 1;
625 SetPixel(hdc, offsetX+1, offsetY-1, GetPixel(hdc, offsetX, offsetY));
626 SetPixel(hdc, offsetX+2, offsetY-1, GetPixel(hdc, offsetX+2, offsetY));
627 SetPixel(hdc, offsetX+1, offsetY-2, GetPixel(hdc, offsetX, offsetY-2));
628 offsetX += borderWidth;
629 offsetY -= borderWidth;
630 SetPixel(hdc, offsetX, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY+1), GetPixel(hdc, offsetX-1, offsetY)));
631 SetPixel(hdc, offsetX+1, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX+1, offsetY), GetPixel(hdc, offsetX+1, offsetY+1)));
632 SetPixel(hdc, offsetX, offsetY-1,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY-1), GetPixel(hdc, offsetX-1, offsetY-1)));
633
634
635
636
637
638 }
639
641 {
642
643 offsetX = rect.right - 1;
644 offsetY = rect.top;
645 SetPixel(hdc, offsetX-1, offsetY+1, GetPixel(hdc, offsetX, offsetY));
646 SetPixel(hdc, offsetX-2, offsetY+1, GetPixel(hdc, offsetX-2, offsetY));
647 SetPixel(hdc, offsetX-1, offsetY+2, GetPixel(hdc, offsetX, offsetY+2));
648 offsetX -= borderWidth;
649 offsetY += borderWidth;
650 SetPixel(hdc, offsetX, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY-1), GetPixel(hdc, offsetX+1, offsetY)));
651 SetPixel(hdc, offsetX-1, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX-1, offsetY), GetPixel(hdc, offsetX-1, offsetY-1)));
652 SetPixel(hdc, offsetX, offsetY+1,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY+1), GetPixel(hdc, offsetX+1, offsetY+1)));
653
654
655
656
657
658 }
659
661 {
662
663 offsetX = rect.right - 1;
664 offsetY = rect.bottom - 1;
665 SetPixel(hdc, offsetX-1, offsetY-1, GetPixel(hdc, offsetX, offsetY));
666 SetPixel(hdc, offsetX-2, offsetY-1, GetPixel(hdc, offsetX-2, offsetY));
667 SetPixel(hdc, offsetX-1, offsetY-2, GetPixel(hdc, offsetX, offsetY-2));
668 offsetX -= borderWidth;
669 offsetY -= borderWidth;
670 SetPixel(hdc, offsetX, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY+1), GetPixel(hdc, offsetX+1, offsetY)));
671 SetPixel(hdc, offsetX-1, offsetY,
pSettings->
MixColors(GetPixel(hdc, offsetX-1, offsetY), GetPixel(hdc, offsetX-1, offsetY+1)));
672 SetPixel(hdc, offsetX, offsetY-1,
pSettings->
MixColors(GetPixel(hdc, offsetX, offsetY-1), GetPixel(hdc, offsetX+1, offsetY-1)));
673
674
675
676
677
678 }
679 }
680 }
681}
#define BEVEL1
Definition BBApi.h:108
#define BEVEL2
Definition BBApi.h:109
COLORREF MixColors(COLORREF colorA, COLORREF colorB)
Definition Settings.cpp:2231