Revision | f1c3d3c521d5ec1099f0f1986aa8e7ce3ad7fca3 (tree) |
---|---|
Zeit | 2021-10-08 23:32:29 |
Autor | yyagi <yyagi.dtxmania@gmai...> |
Commiter | yyagi |
#42998 Fixed failing to draw Artist/Comment field in SELECT MUSIC screen, in case these height is equal to the max number of 2x (but not exceed to width).
@@ -48,7 +48,8 @@ namespace DTXMania | ||
48 | 48 | //graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias; |
49 | 49 | //graphics.DrawString(this.strArtist, this.ft描画用フォント, Brushes.White, (float)0f, (float)0f); |
50 | 50 | //graphics.Dispose(); |
51 | - this.txArtist = new CTextureAf(CDTXMania.Instance.Device, imageStrArtist, CDTXMania.Instance.TextureFormat); | |
51 | + this.txArtist = new CTextureAf(CDTXMania.Instance.Device, imageStrArtist, CDTXMania.Instance.TextureFormat, _label:"Artist"); | |
52 | + txArtist.filename = this.strArtist; | |
52 | 53 | //this.txArtist.vc拡大縮小倍率 = new Vector3(0.5f, 0.5f, 1f); |
53 | 54 | imageStrArtist.Dispose(); |
54 | 55 | } |
@@ -111,6 +112,7 @@ namespace DTXMania | ||
111 | 112 | try |
112 | 113 | { |
113 | 114 | this.txComment = new CTextureAf(CDTXMania.Instance.Device, imageStrComment, CDTXMania.Instance.TextureFormat, _label:"Comment"); |
115 | + this.txComment.filename = this.strComment; | |
114 | 116 | //this.txComment.vc拡大縮小倍率 = new Vector3(0.5f, 0.5f, 1f); |
115 | 117 | } |
116 | 118 | catch (CTextureCreateFailedException) |
@@ -96,6 +96,8 @@ namespace FDK | ||
96 | 96 | { |
97 | 97 | base.MakeTexture(device, _image, format, b黒を透過する, pool, _label); |
98 | 98 | } |
99 | + _orgWidth = base.szテクスチャサイズ.Width; | |
100 | + _orgHeight = base.szテクスチャサイズ.Height; | |
99 | 101 | return; |
100 | 102 | } |
101 | 103 |
@@ -113,6 +115,9 @@ namespace FDK | ||
113 | 115 | { |
114 | 116 | orgWidth = _image.Width; orgHeight = _image.Height; |
115 | 117 | } |
118 | + _orgWidth = orgWidth; | |
119 | + _orgHeight = orgHeight; | |
120 | + | |
116 | 121 | int w = orgWidth, h = orgHeight, foldtimes; |
117 | 122 | |
118 | 123 | int nサポート可能な最大幅 = device.Capabilities.MaxTextureWidth; |
@@ -217,8 +222,6 @@ namespace FDK | ||
217 | 222 | bmpNew = null; |
218 | 223 | #endregion |
219 | 224 | |
220 | - _orgWidth = orgWidth; | |
221 | - _orgHeight = orgHeight; | |
222 | 225 | _foldtimes = foldtimes; |
223 | 226 | this.sz画像サイズ = new Size( orgWidth, orgHeight ); |
224 | 227 | } |
@@ -250,7 +253,7 @@ namespace FDK | ||
250 | 253 | //Debug.WriteLine( "powちょうどではないので、溢れあり。まずは1回折りたたむ。" ); |
251 | 254 | // 試しに、widthをpowに切り詰め、1回折り返してみる。 |
252 | 255 | // width>heightを維持しているなら、テクスチャサイズはより最適な状態になったということになる。 |
253 | - if ( pow <= orgHeight * 2 ) // 新width > 新heightを維持できなくなったなら | |
256 | + if ( pow < orgHeight * 2 ) // 新width >= 新heightを維持できなくなったなら | |
254 | 257 | { // 最適化不可とみなし、baseの処理に委ねる |
255 | 258 | return false; |
256 | 259 | } |