outmap.cxx (47a7c0c1) | outmap.cxx (93ed1f29) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 46 unchanged lines hidden (view full) --- 55 56DBG_NAMEEX( OutputDevice ) 57DBG_NAMEEX( Polygon ) 58DBG_NAMEEX( PolyPolygon ) 59DBG_NAMEEX( Region ) 60 61// ======================================================================= 62 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 46 unchanged lines hidden (view full) --- 55 56DBG_NAMEEX( OutputDevice ) 57DBG_NAMEEX( Polygon ) 58DBG_NAMEEX( PolyPolygon ) 59DBG_NAMEEX( Region ) 60 61// ======================================================================= 62 |
63static long aImplNumeratorAry[MAP_PIXEL+1] = | 63static int const s_ImplArySize = MAP_PIXEL+1; 64static long aImplNumeratorAry[s_ImplArySize] = |
64 { 1, 1, 5, 50, 1, 1, 1, 1, 1, 1, 1 }; | 65 { 1, 1, 5, 50, 1, 1, 1, 1, 1, 1, 1 }; |
65static long aImplDenominatorAry[MAP_PIXEL+1] = | 66static long aImplDenominatorAry[s_ImplArySize] = |
66 { 2540, 254, 127, 127, 1000, 100, 10, 1, 72, 1440, 1 }; 67 68// ----------------------------------------------------------------------- 69 70/* 71Reduziert die Genauigkeit bis eine Fraction draus wird (sollte mal 72ein Fraction ctor werden) koennte man dann auch mit BigInts machen 73*/ --- 1873 unchanged lines hidden (view full) --- 1947 DBG_ASSERTWARNING( eUnitDest != MAP_PIXEL, \ 1948 "MAP_PIXEL mit 72dpi angenaehert" ) 1949 1950// ----------------------------------------------------------------------- 1951 1952#define ENTER3( eUnitSource, eUnitDest ) \ 1953 long nNumerator = 1; \ 1954 long nDenominator = 1; \ | 67 { 2540, 254, 127, 127, 1000, 100, 10, 1, 72, 1440, 1 }; 68 69// ----------------------------------------------------------------------- 70 71/* 72Reduziert die Genauigkeit bis eine Fraction draus wird (sollte mal 73ein Fraction ctor werden) koennte man dann auch mit BigInts machen 74*/ --- 1873 unchanged lines hidden (view full) --- 1948 DBG_ASSERTWARNING( eUnitDest != MAP_PIXEL, \ 1949 "MAP_PIXEL mit 72dpi angenaehert" ) 1950 1951// ----------------------------------------------------------------------- 1952 1953#define ENTER3( eUnitSource, eUnitDest ) \ 1954 long nNumerator = 1; \ 1955 long nDenominator = 1; \ |
1955 DBG_ASSERT( eUnitSource < MAP_LASTENUMDUMMY, "Invalid source map unit"); \ 1956 DBG_ASSERT( eUnitDest < MAP_LASTENUMDUMMY, "Invalid destination map unit"); \ 1957 if( (eUnitSource < MAP_LASTENUMDUMMY) && (eUnitDest < MAP_LASTENUMDUMMY) ) \ | 1956 DBG_ASSERT( eUnitSource < s_ImplArySize, "Invalid source map unit"); \ 1957 DBG_ASSERT( eUnitDest < s_ImplArySize, "Invalid destination map unit"); \ 1958 if( (eUnitSource < s_ImplArySize) && (eUnitDest < s_ImplArySize) ) \ |
1958 { \ 1959 nNumerator = aImplNumeratorAry[eUnitSource] * \ 1960 aImplDenominatorAry[eUnitDest]; \ 1961 nDenominator = aImplNumeratorAry[eUnitDest] * \ 1962 aImplDenominatorAry[eUnitSource]; \ 1963 } \ 1964 if ( eUnitSource == MAP_PIXEL ) \ 1965 nDenominator *= 72; \ --- 545 unchanged lines hidden --- | 1959 { \ 1960 nNumerator = aImplNumeratorAry[eUnitSource] * \ 1961 aImplDenominatorAry[eUnitDest]; \ 1962 nDenominator = aImplNumeratorAry[eUnitDest] * \ 1963 aImplDenominatorAry[eUnitSource]; \ 1964 } \ 1965 if ( eUnitSource == MAP_PIXEL ) \ 1966 nDenominator *= 72; \ --- 545 unchanged lines hidden --- |