Mercurial > public > ostc4
comparison Discovery/Src/gfx_engine.c @ 622:8f78faf88fc5
Adjustments for flipped display view:
After some testing the t3_profile implementation in flipped mode some changes in the visualization were necessary to get a correct view.
| author | Ideenmodellierer |
|---|---|
| date | Wed, 03 Feb 2021 21:45:48 +0100 |
| parents | 82d58470fd94 |
| children | ba83a8ef9bad |
comparison
equal
deleted
inserted
replaced
| 621:6826731ff2be | 622:8f78faf88fc5 |
|---|---|
| 834 if(start.y > stop.y) gfx_flip(&start,&stop); | 834 if(start.y > stop.y) gfx_flip(&start,&stop); |
| 835 | 835 |
| 836 pDestination = (uint16_t*)hgfx->FBStartAdress; | 836 pDestination = (uint16_t*)hgfx->FBStartAdress; |
| 837 if(pSettings->FlipDisplay) | 837 if(pSettings->FlipDisplay) |
| 838 { | 838 { |
| 839 pDestination += (800 - start.x) * hgfx->ImageHeight; | 839 pDestination += (799 - start.x) * hgfx->ImageHeight; |
| 840 pDestination += (480 - start.y); | 840 pDestination += (479 - start.y); |
| 841 stepdir = -1; | 841 stepdir = -1; |
| 842 } | 842 } |
| 843 else | 843 else |
| 844 { | 844 { |
| 845 pDestination += start.x * hgfx->ImageHeight; | 845 pDestination += start.x * hgfx->ImageHeight; |
| 858 if(start.x > stop.x) gfx_flip(&start,&stop); | 858 if(start.x > stop.x) gfx_flip(&start,&stop); |
| 859 pDestination = (uint16_t*)hgfx->FBStartAdress; | 859 pDestination = (uint16_t*)hgfx->FBStartAdress; |
| 860 | 860 |
| 861 if(pSettings->FlipDisplay) | 861 if(pSettings->FlipDisplay) |
| 862 { | 862 { |
| 863 pDestination += (800 - start.x) * hgfx->ImageHeight; | 863 pDestination += (799 - start.x) * hgfx->ImageHeight; |
| 864 pDestination += (480 - start.y); | 864 pDestination += (479 - start.y); |
| 865 stepdir = -1; | 865 stepdir = -1; |
| 866 } | 866 } |
| 867 else | 867 else |
| 868 { | 868 { |
| 869 pDestination += start.x * hgfx->ImageHeight; | 869 pDestination += start.x * hgfx->ImageHeight; |
| 891 { | 891 { |
| 892 pDestination = (uint16_t*)hgfx->FBStartAdress; | 892 pDestination = (uint16_t*)hgfx->FBStartAdress; |
| 893 | 893 |
| 894 if(pSettings->FlipDisplay) | 894 if(pSettings->FlipDisplay) |
| 895 { | 895 { |
| 896 pDestination += (((800 - x0) * hgfx->ImageHeight) + (480 - y0)); | 896 pDestination += (((799 - x0) * hgfx->ImageHeight) + (479 - y0)); |
| 897 } | 897 } |
| 898 else | 898 else |
| 899 { | 899 { |
| 900 pDestination += ((x0 * hgfx->ImageHeight) + y0); | 900 pDestination += ((x0 * hgfx->ImageHeight) + y0); |
| 901 } | 901 } |
| 1589 pStart += LeftLow.y; | 1589 pStart += LeftLow.y; |
| 1590 stepdir = 1; | 1590 stepdir = 1; |
| 1591 } | 1591 } |
| 1592 else | 1592 else |
| 1593 { | 1593 { |
| 1594 pStart += (800 - LeftLow.x - 1) * hgfx->ImageHeight; | 1594 pStart += (799 - LeftLow.x) * hgfx->ImageHeight; |
| 1595 pStart += (480 - LeftLow.y); | 1595 pStart += (479 - LeftLow.y); |
| 1596 stepdir = -1; | 1596 stepdir = -1; |
| 1597 } | 1597 } |
| 1598 | 1598 |
| 1599 // Untere Linie | 1599 // Untere Linie |
| 1600 pDestination = pStart; | 1600 pDestination = pStart; |
