전체 글278 PtInRegion() API 대체 방법 http://support.microsoft.com/kb/121960/ko http://support.microsoft.com/kb/121960/en-us다각형 안에 포인트가 있는지 확인하기 위해서 일반적으로 사용하는 GDI API입니다.예를 들어 CreatePolygonRgn() 호출하고 PtInRegion() 함수로 포인트가 지역 내에 있는지 여부를 확인 합니다.다각형이 복잡한 경우에 CreatePolygonRgn() 함수는 GDI의 힙 영역에서 사용하기 때문에 종종 메모리 부족 에러를 발생시킵니다. 또한 위의 API들은 속도가 떨어집니다. 따라서 성능에 크게 영향을 미칩니다. 기존에 개발해서 사용한 함수도 다각형이 작을 때는 크게 상관이 없지만 점의 개수가 많아 커질 경우에 몇초 이상의 속도저하가 .. 2014. 7. 2. Bitmap Memory 저장시 4 바이트 배수 처리 비트맵은 메모리 저장시, 가로 버퍼의 크기는 항상 4 바이트의 배수가 되어야 한다. 실제 사용하는 이미지의 가로 크기가 4 바이트의 배수가 아니어도 4 배수 바이트로 바꾸어 저장을 한다.예를 들어 BMP 데이터의 Width x Height = 78px X 60px일 경우 78byte가 4의 배수가 아니기 때문에 80byte로 만들어 처리를 한다.따라서 실제 저장되는 메모리는 80px X 60px의 크기가 된다.BITMAPINFOHEADER 구조체의 biWidth, biHeight, biBitCount 값을 사용 #define WIDTHBYTES(bits) (((bits)+31)/32*4) //4 바이트 배수로 변환호출시: rwsize = WIDTHBYTES(biBitCount * biWidth); Vis.. 2014. 7. 1. Improving the performance of Direct2D apps http://msdn.microsoft.com/en-us/library/windows/desktop/dd372260(v=vs.85).aspx Improving the performance of Direct2D appsAlthough Direct2D is hardware accelerated and is meant for high performance, you must use the features correctly to maximize throughput. The techniques we show here are derived from studying common scenarios and might not apply to all app scenarios. Therefore, careful understa.. 2014. 6. 24. Creating a Simple Direct2D Application (Direct2D 프로그램 만들기) Creating a Simple Direct2D Application http://msdn.microsoft.com/en-us/library/windows/desktop/dd370994(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/dd317121(v=vs.85).aspx 1. include header, dll or lib load Direct2D 헤더 파일과 DLL을 load 한다. Windows Vista SP2 부터 Direct2D가 정상적으로 지원된다. 그 이전 OS 특히 XP는 지원하지 않는 것을 잊지 말자. #include #include #pragma comment(lib, "d2d1.lib") 2. Create.. 2014. 6. 24. About Direct2D (Direct2D란?) 1. Graphics APIs in Windows http://msdn.microsoft.com/en-us/library/windows/desktop/ee417756(v=vs.85).aspx#application_compatibility__gdi__and_older_versions_of_direct3d 초기 Windows의 Graphic API는 GDI(Graphic Device Interface)였다. 이 API는 2D를 처리하기 위해서 설계되었고, 윈도우의 사용자 인터페이스 경험(user interface experience)에 대한 기초를 형성했다. DirectDraw와 Direct3D는 하드웨어의 확장으로 Game과 3D 렌더링을 처리하기 위한 API로 도입되었다.Windows XP는 GDI와 D.. 2014. 6. 24. Direct2D API Overview http://msdn.microsoft.com/en-us/library/windows/desktop/dd317121(v=vs.85).aspx#direct2d_header_files Direct2D API OverviewDirect2D provides an API, similar to Direct3D, for use with C or C++. The API exposes a variety of drawing-related functionality:Render targets for display and off-screen rendering using Direct2D, Direct3D, or GDI.Objects for managing drawing state such as coordinate space tr.. 2014. 6. 12. FireMonkey Virtual Keys Virtual Keys Virtual keys provide a symbolic representation of keyboard keys pressed by the user. Virtual keys are used in methods like FMX.Forms.TCommonCustomForm.KeyDown. Virtual key constants define scan codes of keys on PC keyboards. Mac keyboards have different scan codes for some keys. FireMonkey converts Mac scan codes to be equal to the virtual key constants defined in this table. Virtua.. 2014. 6. 6. JSON Spirit: A C++ JSON Parser/Generator Implemented with Boost Spirit 출처: http://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented 관련 소스는 출처 사이트 참고~IntroductionJSON is a text file format similar to XML, but less verbose. It has been called "XML lite". This article describes JSON Spirit, a C++ library that reads and writes JSON files or streams. It is written using the Boost Spirit parser generator. If you are already using Boost,.. 2014. 5. 13. C++ Json Parser http://jsoncpp.sourceforge.net/ http://sourceforge.net/projects/jsoncpp/ http://json.org/ JSON: JavaScript Object Notation (자바스크립트 오브젝트 표기법) Web에서 일반적으로 많이 사용하는 데이터 교환 방식이다. C++에서 유명한 Json parser이다. 2014. 5. 7. 이전 1 ··· 12 13 14 15 16 17 18 ··· 31 다음