- MobileJavaStudy/SnakeBite/FinalSource . . . . 50 matches
g.fillRect(0, 0, getWidth(), getHeight());
g.drawImage(splashImage, getWidth() / 2, getHeight() / 2, Graphics.HCENTER | Graphics.VCENTER);
private final int boardWallWidth = 4;
private final int snakeCellWidth = 4;
private final int canvasWidth;
private final int boardWidth;
private final int boardInnerWidth;
canvasWidth = getWidth();
boardWidth = canvasWidth - 6 - (canvasWidth - 6 - boardWallWidth * 2) % snakeCellWidth;
boardHeight = boardWidth / 10 * 8 - (boardWidth / 10 * 8 - boardWallWidth * 2) % snakeCellWidth;
boardX = (canvasWidth - boardWidth) / 2;
boardInnerX = boardX + boardWallWidth;
boardInnerY = boardY + boardWallWidth;
boardInnerWidth = boardWidth - boardWallWidth * 2;
boardInnerHeight = boardHeight - boardWallWidth * 2;
snakeXRange = boardInnerWidth / snakeCellWidth;
snakeYRange = boardInnerHeight / snakeCellWidth;
g.fillRect(0, 0, canvasWidth, canvasHeight);
g.fillRect(boardX, boardY, boardWidth, boardHeight);
g.fillRect(boardInnerX - 1, boardInnerY - 1, boardInnerWidth + 2, boardInnerHeight + 2);
- MobileJavaStudy/SnakeBite/Spec2Source . . . . 46 matches
private final int boardWallWidth = 4;
private final int snakeCellWidth = 4;
private final int canvasWidth;
private final int boardWidth;
private final int boardInnerWidth;
canvasWidth = getWidth();
boardWidth = canvasWidth - 6 - (canvasWidth - 6 - boardWallWidth * 2) % snakeCellWidth;
boardHeight = boardWidth / 10 * 8 - (boardWidth / 10 * 8 - boardWallWidth * 2) % snakeCellWidth;
boardX = (canvasWidth - boardWidth) / 2;
boardInnerX = boardX + boardWallWidth;
boardInnerY = boardY + boardWallWidth;
boardInnerWidth = boardWidth - boardWallWidth * 2;
boardInnerHeight = boardHeight - boardWallWidth * 2;
snake = new Snake(5, boardInnerWidth / snakeCellWidth, boardInnerHeight / snakeCellWidth);
g.fillRect(0, 0, canvasWidth, canvasHeight);
g.fillRect(boardX, boardY, boardWidth, boardHeight);
g.fillRect(boardInnerX - 1, boardInnerY - 1, boardInnerWidth + 2, boardInnerHeight + 2);
g.fillRect(boardInnerX + snakeCellWidth * cell.snakeCellX,
boardInnerY + snakeCellWidth * cell.snakeCellY,
snakeCellWidth, snakeCellWidth);
- MobileJavaStudy/SnakeBite/Spec3Source . . . . 46 matches
private final int boardWallWidth = 4;
private final int snakeCellWidth = 4;
private final int canvasWidth;
private final int boardWidth;
private final int boardInnerWidth;
canvasWidth = getWidth();
boardWidth = canvasWidth - 6 - (canvasWidth - 6 - boardWallWidth * 2) % snakeCellWidth;
boardHeight = boardWidth / 10 * 8 - (boardWidth / 10 * 8 - boardWallWidth * 2) % snakeCellWidth;
boardX = (canvasWidth - boardWidth) / 2;
boardInnerX = boardX + boardWallWidth;
boardInnerY = boardY + boardWallWidth;
boardInnerWidth = boardWidth - boardWallWidth * 2;
boardInnerHeight = boardHeight - boardWallWidth * 2;
snake = new Snake(10, boardInnerWidth / snakeCellWidth, boardInnerHeight / snakeCellWidth);
g.fillRect(0, 0, canvasWidth, canvasHeight);
g.fillRect(boardX, boardY, boardWidth, boardHeight);
g.fillRect(boardInnerX - 1, boardInnerY - 1, boardInnerWidth + 2, boardInnerHeight + 2);
g.fillRect(boardInnerX + snakeCellWidth * cell.x,
boardInnerY + snakeCellWidth * cell.y,
snakeCellWidth, snakeCellWidth);
- OpenGL스터디_실습 코드 . . . . 22 matches
GLfloat windowWidth;
if(x1 > windowWidth - rsize || x1 < -windowWidth)
if(x1 > windowWidth - rsize + xstep)
x1 = windowWidth - rsize - 1;
else if(x1 < -(windowWidth + xstep))
x1 = -windowWidth - 1;
windowWidth = 100;
windowWidth = 100*aspectRatio;
glOrtho(-windowWidth, windowWidth, -100.0, 100.0, 1.0, -1.0);
//exectly half of width and height
GLfloat windowWidth;
if(x > windowWidth - rsize || x < -windowWidth)
if(x > windowWidth - rsize + xStep)
x = windowWidth - rsize - 1;
else if(x < -windowWidth - xStep)
x = - windowWidth - 1;
void ChangeSize(int width, int height)
glViewport(0, 0, width, height);
if(width <= height)
windowWidth = 100;
- ProjectSemiPhotoshop/SpikeSolution . . . . 8 matches
int GetWidth() {return m_Size.cx;}
int GetRealWidth() {return WIDTHBYTES((GetWidth()*GetBitCount()));}
DWORD WINAPI DIBWidth(LPSTR lpDIB)
/* return the DIB width if it is a Win 3.0 DIB */
return lpbmi->biWidth;
else /* it is an other-style DIB, so return its width */
return (DWORD)lpbmc->bcWidth;
dwBmBitsSize = WIDTHBYTES((lpBI->biWidth)*((DWORD)lpBI->biBitCount)) * lpBI->biHeight;
long lw; // 실제 쓰여진 Width값입니다.
- 데블스캠프2012/넷째날/묻지마Csharp/서민관 . . . . 8 matches
if ( label1.Location.X + label1.Size.Width >= label2.Location.X && label1.Location.Y + label1.Size.Height >= label2.Location.Y ) {
label.SetBounds(label.Location.X + moveX, label.Location.Y + moveY, label.Size.Width, label.Size.Height);
int respownX = rand.Next(this.Size.Width);
label.SetBounds(respownX, respownY, label.Size.Width, label.Size.Height);
label1.SetBounds(label1.Location.X, label1.Location.Y - 5, label1.Size.Width, label1.Size.Height);
label1.SetBounds(label1.Location.X, label1.Location.Y + 5, label1.Size.Width, label1.Size.Height);
label1.SetBounds(label1.Location.X - 5, label1.Location.Y, label1.Size.Width, label1.Size.Height);
label1.SetBounds(label1.Location.X + 5, label1.Location.Y, label1.Size.Width, label1.Size.Height);
- Monocycle/조현태 . . . . 7 matches
void InitMap(int mapWidth, int mapHeight)
g_cityMap.resize(mapWidth);
int mapWidth, mapHeight;
scanf("%d %d", &mapHeight, &mapWidth);
if (0 == mapWidth && 0 == mapHeight)
InitMap(mapWidth, mapHeight);
for (register int j = 0; j < mapWidth; ++j)
- PNGFileFormat/FormatUnitTestInPythonLanguage . . . . 7 matches
# Width
imageWidth = ord(chunkInfo[2][0]) * (256**3)
imageWidth += ord(chunkInfo[2][1]) * (256**2)
imageWidth += ord(chunkInfo[2][2]) * (256**1)
imageWidth += ord(chunkInfo[2][3])
self.assertEqual(im.size[0], imageWidth)
self.data = None; self.width = None; self.height = None; self.bitDepth = None
def makeInfo(self, chunk): #width, height 등의 정보 얻기
# Width
self.width = ord(chunk[0]) * (256**3)
self.width += ord(chunk[1]) * (256**2)
self.width += ord(chunk[2]) * (256**1)
self.width += ord(chunk[3])
for i in range(self.width):
for i in range(self.width):
for i in range(self.width):
for i in range(self.width):
- Gof/Strategy . . . . 6 matches
int _lineWidth;
int componentCount, int lineWidth, int breaks[]
componentCount, _lineWidth, breaks
int componentCount, int lineWidth, int breaks[]
int componmentCount, int lineWidth, int breaks[]
int componentCount, int lineWidth, int breaks[]
- MineFinder . . . . 6 matches
BOOL CMinerBitmapAnalyzer::CompareBitmapBlock (CDC* pDC, CDC* screendc, int nX, int nY, int nWidth, int nHeight, CDC* bmpdc, int nSrcX, int nSrcY)
for (nBi=0;nBi<nWidth;nBi++) {
BOOL CMinerBitmapAnalyzer::CompareBitmapCenterLine (CDC* screendc, int nX, int nY, int nWidth, int nHeight, CDC* bmpdc, int nSrcX, int nSrcY)
for (nBi=int(nWidth / 4);nBi<nWidth-int(nWidth / 4);nBi++) {
- Robbery/조현태 . . . . 6 matches
void InitCityMap(int cityWidth, int cityHeight, int keepTime)
g_cityMap[i].resize(cityWidth);
int cityWidth, cityHeight, keepTime;
scanf("%d %d %d", &cityWidth, &cityHeight, &keepTime);
if (0 == cityWidth && 0 == cityHeight && 0 == keepTime)
InitCityMap(cityWidth, cityHeight, keepTime);
- 레밍즈프로젝트/그리기DC . . . . 6 matches
m_bmp.CreateCompatibleBitmap(m_pDC, m_rt.Width(), m_rt.Height());
m_pMemDC->Rectangle(0, 0, m_rt.Width(), m_rt.Height());
m_pDC->BitBlt(0, 0, m_rt.Width(), m_rt.Height(), m_pMemDC, 0, 0, SRCCOPY);
m_pMemDC->StretchBlt(x-m_bitmapInfo.bmWidth*m_Halign, y-m_bitmapInfo.bmHeight*m_Valign,
(m_bitmapInfo.bmWidth)*m_Hreverse, (m_bitmapInfo.bmHeight)*m_Vreverse,
&BitMapDC, 0, 0, m_bitmapInfo.bmWidth, m_bitmapInfo.bmHeight, kRop);
- DirectDraw/DDUtil . . . . 5 matches
CreateFullScreenDisplay(HWND hWnd, DWORD dwWidth, DWORD dwHeight, DWORD dwBPP)
* dwWidth : 생성할 객체의 넓이
CreateWindowedDisplay HWND hWnd, DWORD dwWidth, DWORD dwHeight)
CreateSurface( CSurface **ppSurface, DWORD dwWidth, DWORD dwHeight)
CreateSurfaceFromBitmap(CSurface** ppSurface, TCHAR* strBMP, DWORD dwDesiredWidth, DWORD dwDesiredHeight)
- JavaScript/2011년스터디/CanvasPaint . . . . 4 matches
ctx.clearRect(0,0,window.innerWidth-15, window.innerHeight-50);
ctx.lineWidth=3;
<canvas id="drawLine" width="300" height="300" onmousedown="hold();"
element.setAttribute("width", window.innerWidth-15);
context.strokeRect(0, 0, window.innerWidth-15, window.innerHeight-50);
<canvas id="testCanvas" width="900" height="500" style="border: 1px solid black"></canvas>
- MFC/HBitmapToBMP . . . . 4 matches
// [nWidth] : 이미지의 넓이
HBITMAP hBitmap, int nWidth, int nHeight)
if ((bmp=GetBMP(type, nWidth, nHeight, hBitmap, pDC->m_hDC,
int width,palsize;
width = ((((w*bit[type]+7)/8+3)/4)*4);
*size = sizeof(BITMAPINFOHEADER)+sizeof(RGBQUAD)*palsize+width*h;
lpvBits->bmiHeader.biWidth = w;
lpvBits->bmiHeader.biSizeImage = width*h;
- 삼총사CppStudy/숙제1/곽세환 . . . . 4 matches
int width;
int GetWidth();
width = 0;
width = x;
for (int j = 0; j < width; j++)
int CRectangle::GetWidth()
return width;
return 2 * (width + height);
return width * height;
width = x;
cout << "rect1의 가로길이 : " << rect1.GetWidth() << endl;
cout << "rect2의 가로길이 : " << rect2.GetWidth() << endl;
- 오목/인수 . . . . 4 matches
int width, height;
public Board(int width, int height) {
this.width = width;
boardState = new int[height][width];
return x >= 0 && x < width && y >= 0 && y < width;
for(int i = 0 ; i < width ; ++i)
public Omok(int width, int height) {
board = new Board(width, height);
private int checkWidth(int x, int y, int wanted) {
checkWidth(x, y, WANTED) == WANTED ||
if( checkWidth(x,y,3) == 3 ) ++count;
final static int WIDTH = 20;
omok = new Omok(WIDTH, HEIGHT);
setSize( (WIDTH + 2) * BLOCKSIZE , (HEIGHT + 2) * BLOCKSIZE );
for(int i = 0 ; i < WIDTH ; ++i)
WIDTH * BLOCKSIZE, BLOCKSIZE + i * BLOCKSIZE);
for(int i = 0 ; i < WIDTH ; ++i) {
int width, height;
width = height = 5;
board = new Board(width, height);
- 레밍즈프로젝트/프로토타입/MFC더블버퍼링 . . . . 3 matches
m_bmp.CreateCompatibleBitmap(m_pDC, m_rt.Width(), m_rt.Height());
m_pMemDC->Rectangle(0, 0, m_rt.Width(), m_rt.Height());
m_pDC->BitBlt(0, 0, m_rt.Width(), m_rt.Height(), m_pMemDC, 0, 0, SRCCOPY);
- Android/WallpaperChanger . . . . 2 matches
* {{{ manager.setBitmap(Bitmap.createScaledBitmap(b, d.getWidth()*4, d.getHeight(), true)); }}} 왜 * 4냐면 내 폰에 배경화면이 4칸이라 답하겠더라
manager.setBitmap(Bitmap.createScaledBitmap(b, d.getWidth()*4, d.getHeight(), true));
protected void drawHorizontalScrollBar(Canvas canvas, int width, int height) {
mScrollBar.setBounds(0, height - size, width, height);
- DirectDraw . . . . 2 matches
ddsd.dwFlags = DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH; // 높이와 넓이를 지정할 수 있음
ddsd.dwWidth = 16; // 넓이
bmp.bmWidth 와 bmp.bmHeight로 비트맵의 크기를 얻어낼 수 있다.
- Dubble_Buffering . . . . 2 matches
bitmap.CreateCompatibleBitmap(pDC, rect.Width(), rect.Height());
pDC->BitBlt(0, 0, rect.Width(), rect.Height(), &memDC, 0, 0, SRCCOPY);
- MoreEffectiveC++/Miscellany . . . . 2 matches
virtual void resize(int newWidth, int newHeight);
int width() const;
int width() const { return w.width(); }
virtual void resize(int newWidth, int newHeight);
- TheJavaMan/스네이크바이트 . . . . 2 matches
buff=createImage(getWidth(), getHeight());
gb.clearRect(0,0, getWidth(), getHeight());
- 데블스캠프2009/목요일/연습문제/MFC/서민관 . . . . 2 matches
int x = (rect.Width() - cxIcon + 1) / 2;
int x = (rect.Width() - cxIcon + 1) / 2;
- .vimrc . . . . 1 match
set shiftwidth=4
let TE_WinWidth = 20 " TagExplorer 창크기 조절
- 2dInDirect3d/Chapter1 . . . . 1 match
Width : 가로폭
- 2dInDirect3d/Chapter2 . . . . 1 match
Width = 800: (대개 화면의)넓이
- 5인용C++스터디/더블버퍼링 . . . . 1 match
bx=bit.bmWidth;
- Java/SwingCookBook . . . . 1 match
frame.setLocation((d.width-frame.getWidth())/2, (d.height-frame.getHeight())/2);
- MobileJavaStudy/HelloWorld . . . . 1 match
g.fillRect(g.getClipX(),g.getClipY(),g.getClipWidth(),g.getClipHeight());
- PNGFileFormat/FileStructure . . . . 1 match
* Width : 픽셀단위의 이미지 너비
- Refactoring/MakingMethodCallsSimpler . . . . 1 match
if (name.equals("width"))
_width = value;
void setWidth (int arg) {
_width = arg;
- SolarSystem/상협 . . . . 1 match
GLvoid ReSizeGLScene(GLsizei width, GLsizei height)
glViewport(0,0,width,height);
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f);
BOOL CreateGLWindow(char *title, int width, int height, int bits, bool fullscreenflag)
WindowRect.right=(long)width;
dmScreenSettings.dmPelsWidth = width;
dmScreenSettings.dmFields=DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT;
ReSizeGLScene(width,height);
- html5/canvas . . . . 1 match
* lineWidth
* width
- 데블스캠프2009/목요일/연습문제/MFC/김태욱 . . . . 1 match
int x = (rect.Width() - cxIcon + 1) / 2;
- 데블스캠프2009/목요일/연습문제/MFC/박준호 . . . . 1 match
int x = (rect.Width() - cxIcon + 1) / 2;
- 데블스캠프2009/목요일/연습문제/MFC/송지원 . . . . 1 match
int x = (rect.Width() - cxIcon + 1) / 2;
- 데블스캠프2009/목요일/연습문제/MFC/정종록 . . . . 1 match
int x = (rect.Width() - cxIcon + 1) / 2;
- 레밍즈프로젝트/프로토타입/마스크이미지 . . . . 1 match
m_pMemDC->BitBlt(x, y, bitmapInfo.bmWidth, bitmapInfo.bmHeight, &BitMapDC, 0, 0, rop);
- 황재선 . . . . 1 match
JTable에서 Column width 변경하려면 아래와 같이~ :)
jtable.getColumnModel().getColumn(index).setPreferredWidth(size);
http://www.ictp.trieste.it/~manuals/programming/Java/tutorial/uiswing/components/table.html#width
jtable.getPreferredScrollableViewportSize().setSize(width, height);
Found 40 matching pages out of 7555 total pages (5000 pages are searched)
You can also click here to search title.