Graphics2D 畫string問題

2025-02-10 16:40:08 字數 1855 閱讀 8272

1樓:網友

我用的是vs2008開發工具。

using ; /匯入名稱空間。

using ;

using ;

using ;

public partial class _default :

protected void page_load(object sender, eventargs e)

bitmap bmp = new bitmap(400,50);

graphics g = ;

font f = new font("宋體", 24, ;new rectangle(2, 2, 390, 40));

web上的gdi+繪圖示例", f, ,10, 5);,

2樓:帳號已登出

getradius()返回的是double的值吧,試試寫(int)(

j**a graphics2d畫圖問題

3樓:網友

應該是畫出來了。

但是這種圖一旦視窗被其他視窗覆蓋,或者有拖動等。

所畫的圖就會有缺失或全沒了。

j**a graphics2d drawstring()內容換行問題

4樓:

, off, len);把字串tochararray()換成char陣列,放到方法裡獲取長度。

graphics2d繪圖問題

5樓:

直接獲取jframe的graphics是不行的。

要不你給他panel,然後獲取panel的graphics。

要不你就直接g2=(graphics2d);

j**a中graphics類drawstring()方法問題

6樓:網友

drawstring(string, font, brush, pointf)

在指定位置並且用指定的 brush 和 font 物件繪製指定的文字字串。

drawstring(string, font, brush, rectanglef)

在指定矩形並且用指定的 brush 和 font 物件繪製指定的文字字串。

drawstring(string, font, brush, pointf, stringformat)

使用指定 stringformat 的格式化特性,用指定的 brush 和 font 物件在指定的位置繪製指定的文字字串。

drawstring(string, font, brush, rectanglef, stringformat)

使用指定 stringformat 的格式化特性,用指定的 brush 和 font 物件在指定的矩形繪製指定的文字字串。

drawstring(string, font, brush, single, single)

在指定位置並且用指定的 brush 和 font 物件繪製指定的文字字串。

drawstring(string, font, brush, single, single, stringformat)

使用指定 stringformat 的格式化特性,用指定的 brush 和 font 物件在指定的位置繪製指定的文字字串。

j**a graphics畫字串都是橫著的,可不可以弄成傾斜的

7樓:匿名使用者

區域性旋或頌薯轉,做櫻友另一張衫者臨時的,graphics2d g2d = graphics2d)g;

轉換後,可以旋轉。

旋轉後,再貼回去。

函式M 2 D0,1,其中2 D為D的所有子集,那個箭頭什麼意思?這個公式具體舉個例項

箭號是屬於的意思,即前面提到的函式包括子集的定義域都在 0,1 中 我不太理解你 其中2 d為d的所有子集 這句話的意思因此舉例不了 2 d 1 1 2 d 21 4 怎麼解?設2 d a 用等比數列求和公式的話,出現一元三次方程 4 4a 3 21a 2 21a 0 設2 d a a 0 則 a ...

cocos2d和box2d 2者有什麼區別

cocos2d和baibox2d是完全不同的東西,cocos2d是乙個開du源框架,可以構建2d環境 zhi,上面有daoccscene,cclayer,ccsprite等概念,用它可以構建很好內的2d環境。box2d是乙個物容理引擎,模擬乙個真實的物理環境,上面有重力加速度,摩擦力,剛體能概念,在...

佳能5d2跟6d哪個好,佳能5D2跟6D哪個好?

在體型上,佳能eos 5dmark ii比eos 6d要威猛一些,操控也比eos 6d專業化。這也不難理解,eos 5dmark ii定位於準專業,eos 6d定位於入門,所以自然一切從簡。不過這也沒什麼不好,操控更加簡潔,體積更輕巧,簡單實用也符合多數玩家的偏好。在對焦方面,佳能eos 5dmar...