Skip to content

Commit

Permalink
更新版权信息
Browse files Browse the repository at this point in the history
修复一个小bug
  • Loading branch information
GcsSloop committed Sep 3, 2016
1 parent 3e05b93 commit 645b400
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 79 deletions.
35 changes: 23 additions & 12 deletions Library/src/main/java/com/gcssloop/view/CustomView.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* Copyright (c) 2016 GcsSloop
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* GitHub : https://github.com/GcsSloop
* Weibo : http://weibo,com/GcsSloop
* Blog : http://www.gcssloop.com
*
* Last modify $2016-09-03 23:07:52
*/

package com.gcssloop.view;

import android.content.Context;
Expand All @@ -6,17 +28,6 @@
import android.util.AttributeSet;
import android.view.View;

/**
* This view have some method and field can help you custom view.
* <p/>
* Author: GcsSloop
* <p/>
* Created Date: 16/5/18
* <p/>
* Copyright (C) 2016 GcsSloop.
* <p/>
* GitHub: https://github.com/GcsSloop
*/
public class CustomView extends View {

/**
Expand Down Expand Up @@ -46,7 +57,7 @@ public class CustomView extends View {


public CustomView(Context context) {
super(context, null);
this(context, null);
}

public CustomView(Context context, AttributeSet attrs) {
Expand Down
33 changes: 22 additions & 11 deletions Library/src/main/java/com/gcssloop/view/utils/CanvasAidUtils.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
/*
* Copyright (c) 2016 GcsSloop
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* GitHub : https://github.com/GcsSloop
* Weibo : http://weibo,com/GcsSloop
* Blog : http://www.gcssloop.com
*
* Last modify $2016-09-03 23:07:52
*/

package com.gcssloop.view.utils;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Point;

/**
* This is a ait tool for canvas
* <p>
* Author: GcsSloop
* <p>
* Created Date: 16/5/20
* <p>
* Copyright (C) 2016 GcsSloop.
* <p>
* GitHub: https://github.com/GcsSloop
*/
public class CanvasAidUtils {

private static boolean isDrawAid = true;
Expand Down
43 changes: 24 additions & 19 deletions Library/src/main/java/com/gcssloop/view/utils/CanvasUtils.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* Copyright (c) 2016 GcsSloop
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* GitHub : https://github.com/GcsSloop
* Weibo : http://weibo,com/GcsSloop
* Blog : http://www.gcssloop.com
*
* Last modify $2016-09-03 23:07:52
*/

package com.gcssloop.view.utils;

import android.graphics.Canvas;
Expand All @@ -6,27 +28,14 @@
import android.graphics.PointF;
import android.support.annotation.NonNull;

/**
* Author: GcsSloop
* <p/>
* Created Date: 16/6/2
* <p/>
* Copyright (C) 2016 GcsSloop.
* <p/>
* GitHub: https://github.com/GcsSloop
*/
public class CanvasUtils {


private CanvasUtils() {
}

/**
* draw a line by tow point
*
* @param p1 point
* @param p2 point
* @param paint paint
* Draw a straight line through the points.
*/
public static void drawLine(Point p1, Point p2, Canvas canvas, Paint paint) {
canvas.save();
Expand All @@ -35,11 +44,7 @@ public static void drawLine(Point p1, Point p2, Canvas canvas, Paint paint) {
}

/**
* draw a line by tow point
*
* @param p1 point
* @param p2 point
* @param paint paint
* Draw a straight line through the points
*/
public void drawLine(PointF p1, PointF p2, Canvas canvas, Paint paint) {
canvas.save();
Expand Down
37 changes: 22 additions & 15 deletions Library/src/main/java/com/gcssloop/view/utils/DensityUtils.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
/*
* Copyright (c) 2016 GcsSloop
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* GitHub : https://github.com/GcsSloop
* Weibo : http://weibo,com/GcsSloop
* Blog : http://www.gcssloop.com
*
* Last modify $2016-09-03 23:07:52
*/

package com.gcssloop.view.utils;

import android.content.Context;

/**
* A utils of screen density.
* <p/>
* it can help you convert the different unit.
* <p/>
* E.g: dp -> px ps->dp sp->px px->sp
* <p/>
* Author: GcsSloop
* <p/>
* Created Date: 16/5/24
* <p/>
* Copyright (C) 2016 GcsSloop.
* <p/>
* GitHub: https://github.com/GcsSloop
*/
public class DensityUtils {

public DensityUtils() {
Expand Down
33 changes: 22 additions & 11 deletions Library/src/main/java/com/gcssloop/view/utils/MathUtils.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
/*
* Copyright (c) 2016 GcsSloop
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* GitHub : https://github.com/GcsSloop
* Weibo : http://weibo,com/GcsSloop
* Blog : http://www.gcssloop.com
*
* Last modify $2016-09-03 23:07:52
*/

package com.gcssloop.view.utils;

import android.graphics.Point;
import android.graphics.PointF;

/**
* A Math utils, It can help you make some common calculations.
* <p>
* Author: GcsSloop
* <p>
* Created Date: 16/5/24
* <p>
* Copyright (C) 2016 GcsSloop.
* <p>
* GitHub: https://github.com/GcsSloop
*/
public class MathUtils {

public MathUtils() {
Expand Down
33 changes: 22 additions & 11 deletions Library/src/main/java/com/gcssloop/view/utils/ViewUtils.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
/*
* Copyright (c) 2016 GcsSloop
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* GitHub : https://github.com/GcsSloop
* Weibo : http://weibo,com/GcsSloop
* Blog : http://www.gcssloop.com
*
* Last modify $2016-09-03 23:07:52
*/

package com.gcssloop.view.utils;

import android.view.View;
import android.view.ViewGroup;

/**
* Utils for view.
* <p/>
* Author: GcsSloop
* <p/>
* Created Date: 16/5/19
* <p/>
* Copyright (C) 2016 GcsSloop.
* <p/>
* GitHub: https://github.com/GcsSloop
*/
public class ViewUtils {

public ViewUtils() {
Expand Down

0 comments on commit 645b400

Please sign in to comment.