Rev 93 | Rev 149 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 93 | Rev 131 | ||
---|---|---|---|
Line 84... | Line 84... | ||
84 | else if (width<=8) type = Stamp::est8x8; |
84 | else if (width<=8) type = Stamp::est8x8; |
85 | else if (width<=12) type = Stamp::est12x12; |
85 | else if (width<=12) type = Stamp::est12x12; |
86 | else if (width<=16) type = Stamp::est16x16; |
86 | else if (width<=16) type = Stamp::est16x16; |
87 | else if (width<=24) type = Stamp::est24x24; |
87 | else if (width<=24) type = Stamp::est24x24; |
88 | else if (width<=32) type = Stamp::est32x32; |
88 | else if (width<=32) type = Stamp::est32x32; |
89 | else type = Stamp::est48x48; |
- | |
- | 89 | else if (width<=48) type = Stamp::est48x48; |
|
- | 90 | else type = Stamp::est64x64; |
|
90 | 91 | ||
91 | Stamp *stamp = StampContainer::newStamp(type); |
92 | Stamp *stamp = StampContainer::newStamp(type); |
92 | int swidth = width; |
93 | int swidth = width; |
93 | if (width>47) { |
- | |
94 | qDebug() << "Warning: grid to big, truncated stamp t0 47x47px!"; |
- | |
95 | swidth = 47; |
- | |
- | 94 | if (width>63) { |
|
- | 95 | qDebug() << "Warning: grid too big, truncated stamp to 63x63px!"; |
|
- | 96 | swidth = 63; |
|
96 | }
|
97 | }
|
97 | stamp->setOffset(swidth/2); |
98 | stamp->setOffset(swidth/2); |
98 | int coff = c/2 - swidth/2; // e.g.: grid=25, width=7 -> coff = 12 - 3 = 9 |
99 | int coff = c/2 - swidth/2; // e.g.: grid=25, width=7 -> coff = 12 - 3 = 9 |
99 | int x,y; |
100 | int x,y; |
100 | for (x=0;x<swidth; x++) |
101 | for (x=0;x<swidth; x++) |